Boost logo

Boost :

Subject: Re: [boost] [thread] condition::try_wait() and thread::try_join()?
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-11-10 10:05:44

"vicente.botet" <vicente.botet_at_[hidden]> writes:

> From: "Anthony Williams" <anthony.ajw_at_[hidden]>
>> 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.


Anthony Williams
Author of C++ Concurrency in Action |
Custom Software Development |
Just Software Solutions Ltd, Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK

Boost list run by bdawes at, gregod at, cpdaniel at, john at