
----- Original Message ----- From: "Anthony Williams" <anthony.ajw@gmail.com> To: <boost@lists.boost.org> Sent: Monday, November 10, 2008 4:05 PM Subject: Re: [boost] [thread] condition::try_wait() and thread::try_join()?
"vicente.botet" <vicente.botet@wanadoo.fr> writes:
From: "Anthony Williams" <anthony.ajw@gmail.com>
try_join is more sensible, and it might be worth adding it.
I'm more interested on the try_join. Does the following do a try_join?
boost::thread th(fct); th.timed_join(0);
Yes, that would work (though you'd need to specify units: a plain "0" won't compile).
Is this the more efficient way?
I'm not sure what you're asking here.
My question is if this is the correct way to know if a thread has finished or if you know a better way? Vicente