|
Boost : |
From: Roland (roland.schwarz_at_[hidden])
Date: 2003-12-30 09:26:54
Does anyone know if it is possible somehow to have a native
Windows event variable signal a boost thread condition?
I am trying to use the monitor pattern to make my port class
thread safe. On entry to my read function I acquire the lock and
then when it comes to wait for any data to receive I get
in trouble. The condition should be awakened by the received
data. Windows can do this by signaling an event variable, and
one can wait on this via WaitForMultipleObjects.
But I see no obvious way how this relates to my "condition" variable.
Should I simply unlock the mutex before entering WaitForMultipleObjects?
There is no user accessible API for such an operation. Is it ok
to use locks on the heap in such a case?
What is about race conditions in this case?
Can anyone give me a hint of how to deal with other system-level
blocking situations?
Perhaps I am simply overlooking the obvious.
Thank you,
Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk