Boost logo

Boost Users :

From: Rene Tarantino (rene4jazz_at_[hidden])
Date: 2007-09-03 10:11:35


Hi:

I'm having a bit of trouble with the implementation of the monitor
pattern by means of using mutex and condition classes.

I have a scheduler thread and a group of worker threads and the
scheduling algorithm waits until some worker notifies that it has done
the job.

It seems that the call to condition::notify_one() must be in a
specific order because if the worker calls notify_one before the
scheduler arrives to the waiting line it behaves as if the condition
object has lost the previous call to notify_one.

Is this behavior the one we must expect? and, if so, can any one share
a workaround.

Thanks in advance.

René


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net