bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ost::Event and multiple wait()s


From: Daniel E Baumann
Subject: Re: ost::Event and multiple wait()s
Date: Thu, 14 Nov 2002 23:47:48 -0600
User-agent: Mutt/1.4i

On Wed, Nov 13, 2002 at 06:40:00PM -0500, David Sugar wrote:
> 
> "Event" is meant to simulate the behavior of win32 "event" objects, so the 
> behavior is consistent with that. 

Yea, I suppose that is the whole point of it, but what I was getting
at I suppose is having some class that abstracts condition variables
even further by already locking the conditional test with a mutex to
prevent the common race condition that can lead to the infinite wait
problem. Granted ppl can do this themselves it would be nice to just
call wait() from multiple threads and then some thread(s) can do a
notify() to wake up the waiting threads either one with plain
pthread_signal_cond or all waiting threads with
pthread_signal_broadcast. 

Where I have specifically see this type of behavior is in the Java
Object class where multiple threads can wait() on the object's monitor
and then be either notify()ed or notifyAll()ed.

At any rate, I suppose I am not going to harp much more on this ;).

Cheers,
Dan
-- 
And if cynics ridicule freedom, ridicule community...if ``hard nosed 
realists'' say that profit is the only ideal...just ignore them, and use 
copyleft all the same.
      -- RMS

Was I helpful?  Let others know: 
  http://svcs.affero.net/rm.php?r=chillywilly




reply via email to

[Prev in Thread] Current Thread [Next in Thread]