
21 Apr
2013
21 Apr
'13
10:45 a.m.
Le 21/04/13 10:27, Michael Marcin a écrit :
I recently ran across the need to spawn a thread and wait for it to finish its setup before continuing.
The accepted answer seems to be using a mutex and condition variable to achieve this.
However that work clutters up the code quite a bit with the implementation details.
I came across Java's CountDownLatch which does basically the same work but bundles it up into a tidy package.
What about using boost::barrier [1]? Best, Vicente [1] http://www.boost.org/doc/libs/1_53_0/doc/html/thread/synchronization.html#th...