[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ost::Event and multiple wait()s
From: |
Federico Montesino Pouzols |
Subject: |
Re: ost::Event and multiple wait()s |
Date: |
Wed, 13 Nov 2002 22:38:50 +0100 |
User-agent: |
Mutt/1.4i |
If you want only one thread to be picked, I think Event will
not work. Event::signal uses pthread_cond_broadcast, so all waiting
threads will be reactivated. Conditional however has a signal method
that allows to specify whether to use pthread_cond_broadcast or
pthread_cond_signal.
On Mon, Nov 11, 2002 at 07:14:22AM -0600, Daniel E Baumann wrote:
> I was just wondering if it is possible for multiple threads to wait on
> an Event and for it to pick one of them to run when calling
> signal(). Looks to me that it is possible becase it uses a condition
> variable. I just wanted to confirm this. I need to write a boolean
> lock class and would like this capability.
>
> 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
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp