Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #5662 > unrolled thread

Re: pthread_cond_wait waking up spuriously?

Started byaekkach4444@gmail.com
First post2020-03-18 18:03 -0700
Last post2020-03-19 06:50 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.programming.threads

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: pthread_cond_wait waking up spuriously? aekkach4444@gmail.com - 2020-03-18 18:03 -0700
    Re: pthread_cond_wait waking up spuriously? Bonita Montero <Bonita.Montero@gmail.com> - 2020-03-19 06:50 +0100

#5662 — Re: pthread_cond_wait waking up spuriously?

Fromaekkach4444@gmail.com
Date2020-03-18 18:03 -0700
SubjectRe: pthread_cond_wait waking up spuriously?
Message-ID<fd00afab-afff-4ce8-8152-8dd59d8dae0f@googlegroups.com>
Am Dienstag, 1. Mai 2001 21:57:08 UTC+7 schrieb Vincent Predoehl:
> I saw this in the man pages for pthread_cond_wait:
> 
> When using condition variables there is always a boolean predicate
> involving shared variables associated with each condition wait that is
> true if the thread should proceed. Spurious wakeups from the
> pthread_cond_wait() or pthread_cond_timedwait() functions may occur.
> Since the return from pthread_cond_wait() or pthread_cond_timedwait()
> does not imply anything about the value of this predicate, the predicate
> should be re-evaluated upon such return.
> 
> Can anyone explain to me why this is so?
> 
> Thanks,
> --
> Vincent

[toc] | [next] | [standalone]


#5664

FromBonita Montero <Bonita.Montero@gmail.com>
Date2020-03-19 06:50 +0100
Message-ID<r4v16u$94c$1@news.albasani.net>
In reply to#5662
Also consider stolen wakeups !

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web