Boost logo

Boost :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2007-01-14 11:51:19


> Are you trying to emulate something similar as starting the threads in a
> suspended state, later trying to fire them at once?
> ---------------------------------
> Yep, thats it.

What is the reason for trying this? I mean, you still will not be able
to start them 'at once'.

What I want to say is: you might see almost the same behaviour as when
'just starting them'.

If your application explicitely depends on starting the threads at the
same time you should consider rethinking your design.

----------------
The code was only testing for that condition where a lot of threads might be in the same section at once. I noticed that if I just let them start working as I created them, the first one usually got to do the work first and there were never too many threads in the section at the same time. I was really testing, or trying to test, that doing the work was thread-safe. Not sure if there is a better way to test if something is thread-safe without lots of threads in it at the same time!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk