condition impl on win32

garrygarry Member
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.

Comments

  • matthewmatthew NL, CanadaMatthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications EngineMember ✭✭✭
    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, Matthew
Sign In or Register to comment.