apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: counting semaphores
Date Wed, 18 May 2005 20:06:23 GMT
Have you looked at the apr_thread_cond_* API? These are
virtually identical to POSIX Condition Variables, and can
be used to do what you're talking about.


On May 18, 2005, at 4:09 AM, Bruno Haas wrote:

> I am quite surprised that there are no counting semaphores in apr.  
> What I would need to do is have thread A releasing a semaphore for  
> as many times as an event has happened and thread B blocked waiting  
> for the semaphore. The counting semaphore would guarantee that  
> thread B is "woken up" as many times as the event has happened.
> I seem to be unable to do this sort of thing using only mutexes,  
> any ideas ?
> Bruno

View raw message