
11 Nov
2008
11 Nov
'08
10:05 a.m.
----- Original Message ----- From: "Anthony Williams" <anthony.ajw@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, November 11, 2008 10:45 AM Subject: Re: [boost] [thread] condition::try_wait() and thread::try_join()?
"vicente.botet" <vicente.botet@wanadoo.fr> writes:
My question is if this is the correct way to know if a thread has finished or if you know a better way?
If you want to know if a thread has finished (without waiting for it) then this is currently the only direct way. However, if you want to know if it has finished *the work it was doing* then you might be better off setting a flag in the thread function and checking that.
Thanks, Vicente