Re: How to wait for multiple threads simultaneously?
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Wed, 13 Feb 2008 03:41:48 -0800 (PST)
On Feb 13, 1:51 am, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
You can then spin on that condition variable.
To 'spin' on some lock would mean to busy-wait until it is free, eg
while (try_to_take(&lock) == FAILED);
Right, but a condition variable is not a lock. To 'spin' on a
condition variable means to block on it until the predicate occurs,
like
while(!predicate) pthread_cond_wait(...);
DS
.
- Follow-Ups:
- Re: How to wait for multiple threads simultaneously?
- From: Rainer Weikusat
- Re: How to wait for multiple threads simultaneously?
- References:
- How to wait for multiple threads simultaneously?
- From: chjfth
- Re: How to wait for multiple threads simultaneously?
- From: David Schwartz
- Re: How to wait for multiple threads simultaneously?
- From: Rainer Weikusat
- How to wait for multiple threads simultaneously?
- Prev by Date: [Commercial] Training on Linux System and Kernel Programming from Professionals
- Next by Date: Re: How to wait for multiple threads simultaneously?
- Previous by thread: Re: How to wait for multiple threads simultaneously?
- Next by thread: Re: How to wait for multiple threads simultaneously?
- Index(es):