Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: calvin <chima1979@xxxxxxxxx>
- Date: Mon, 29 Sep 2008 11:38:43 -0700 (PDT)
Thanks, DS. So POSIX does has such a bug?
What do you mean "This bug usually occurs because a thread called
pthread_cond_wait when it should not have." I think whether a thread
should call pthread_cond_wait is the merely logic of my problem,
right?
On Sep 29, 11:02 am, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Sep 29, 10:07 am, calvin <chima1...@xxxxxxxxx> wrote:
Thanks, but this has nothing to do with predicater. The threads waits
on a cond "never" wake up, even some other threads broadcasts.
Also, this is rare, and only happens when CPU load is high. In 99.9%
time it works well. That's why I suspect it's a POSIX's bug.
This bug usually occurs because a thread called pthread_cond_wait when
it should not have. You must check the predicate before calling
pthread_cond_wait.
DS
.
- Follow-Ups:
- Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: David Schwartz
- Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- References:
- Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: chima1979
- Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: Chris M. Thomasson
- Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: calvin
- Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- From: David Schwartz
- Is this a well-known bug of POXIS pthread_cond_timewait()?
- Prev by Date: Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- Next by Date: Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- Previous by thread: Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- Next by thread: Re: Is this a well-known bug of POXIS pthread_cond_timewait()?
- Index(es):
Relevant Pages
|
Loading