Archived
This forum has been archived. Please start a new discussion on GitHub.
condition impl on win32
in Bug Reports
Ice version 2.1.0, WIN32 platform, DEBUG compilation
I'm using Monitor<Mutex>'s notify()/timedWait() primitives in my program. Periodically it's getting stuck. Basically everything is ok if notifyAll() is used. I found that the reason is Cond implemenation. First, preWait(), I guess, should use _internal.lock()/unlock() before touching _blocked member var. Second, without deeply digging into that code, if I comment out "if(timedOut) { _queue.wait(); }" in postWait() everything is ok.
I'm using Monitor<Mutex>'s notify()/timedWait() primitives in my program. Periodically it's getting stuck. Basically everything is ok if notifyAll() is used. I found that the reason is Cond implemenation. First, preWait(), I guess, should use _internal.lock()/unlock() before touching _blocked member var. Second, without deeply digging into that code, if I comment out "if(timedOut) { _queue.wait(); }" in postWait() everything is ok.
0
Comments
-
Hi,garry wrote:Ice version 2.1.0, WIN32 platform, DEBUG compilation
I'm using Monitor<Mutex>'s notify()/timedWait() primitives in my program. Periodically it's getting stuck. Basically everything is ok if notifyAll() is used. I found that the reason is Cond implemenation. First, preWait(), I guess, should use _internal.lock()/unlock() before touching _blocked member var. Second, without deeply digging into that code, if I comment out "if(timedOut) { _queue.wait(); }" in postWait() everything is ok.
I'll look into the problem. However, it would be easier to track down if you can provide a small self contained sample that reproduces this problem.
Regards, Matthew0