Message106167
The "barrier" synchronization primitive is often very useful. It is simpler to use than an Event, for example, when waiting for threads to start up, or to finish.
The patch contains a simple barrier implementation based on a Condition variable, for your perusal.
See http://en.wikipedia.org/wiki/Barrier_(computer_science) for info.
This particular implementation contains an important feature: The ability to adjust the 'count' of the barrier. This is useful in case a thread dies for some reason, to avoid a deadlock for the other threads.
There is still no documentation, since this is only a proposal, but there is a unittest. |
|
Date |
User |
Action |
Args |
2010-05-20 17:07:42 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson |
2010-05-20 17:07:42 | kristjan.jonsson | set | messageid: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> |
2010-05-20 17:07:28 | kristjan.jonsson | link | issue8777 messages |
2010-05-20 17:07:28 | kristjan.jonsson | create | |
|