Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #1336

Re: condvars of ACE framwork - possible bug

Newsgroups comp.programming.threads
Date 2013-02-06 19:39 -0800
References <9c4fabd6-a4e1-4ef1-9301-5fe7ef5df016@googlegroups.com> <a665fcf7-0bab-4207-b265-dc84a90c0d59@googlegroups.com> <a171fec1-2833-4c0b-a89e-f1d0b0d6876a@e10g2000vbv.googlegroups.com>
Message-ID <5ded78d9-8988-45aa-8de0-ccc4b702f7e8@googlegroups.com> (permalink)
Subject Re: condvars of ACE framwork - possible bug
From Codeplug <graham.greene@charter.net>

Show all headers | View raw


On Wednesday, February 6, 2013 9:36:29 PM UTC-5, Michael Podolsky wrote:
> > If ACE condvars are anything like Posix condvars, then looping on a predicate condition should solve the problem. See page 165 here (pdf):http://www.cs.wustl.edu/~schmidt/PDF/ACE-tutorial.pdf
> 
> 
> 
> looping on a condition and condvar solves spurious wake-ups problem,
> 
> not lost wake-ups problem. If you meant anything else, could you
> 
> provide your code?

I'm probably not understanding the stated issue then :) It would help me to understand if I had the scenario you describe in code. eg:

condvar c
mutex m

Thread A:
--------------------
m.lock
predicate=true
c.signal
m.unlock
...
m.lock
while (predicate)
  c.wait(m)
m.unlock


Thread B:
--------------------
m.lock
while (!predicate)
  c.wait(m)
predicate=false
c.signal
m.unlock

This seems correct to me using Posix semantics, but this probably isn't the scenario you described.

gg

Back to comp.programming.threads | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-04 22:38 -0800
  Re: condvars of ACE framwork - possible bug Codeplug <graham.greene@charter.net> - 2013-02-06 13:42 -0800
    Re: condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-06 18:36 -0800
      Re: condvars of ACE framwork - possible bug Codeplug <graham.greene@charter.net> - 2013-02-06 19:39 -0800
        Re: condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-06 20:01 -0800
          Re: condvars of ACE framwork - possible bug Codeplug <graham.greene@charter.net> - 2013-02-06 20:16 -0800
            Re: condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-06 20:30 -0800
              Re: condvars of ACE framwork - possible bug Codeplug <graham.greene@charter.net> - 2013-02-07 09:05 -0800
                Re: condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-07 19:27 -0800
  Re: condvars of ACE framwork - possible bug Noob <root@127.0.0.1> - 2013-02-07 11:54 +0100
    Re: condvars of ACE framwork - possible bug Michael Podolsky <michael.podolsky.69@gmail.com> - 2013-02-07 19:24 -0800

csiph-web