|
Boost : |
Subject: Re: [boost] [thread] condition::try_wait() and thread::try_join()?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-11-11 05:05:48
----- Original Message -----
From: "Anthony Williams" <anthony.ajw_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, November 11, 2008 10:45 AM
Subject: Re: [boost] [thread] condition::try_wait() and thread::try_join()?
>
> "vicente.botet" <vicente.botet_at_[hidden]> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk