-
Committer:
Gustavo Niemeyer
-
Date:
2010-12-13 13:07:32 UTC
-
Revision ID:
gustavo@niemeyer.net-20101213130732-1ppjruxb14hghlad
Use 'while' with pthread_cond_wait, rather than 'if'. Even though
there's a single consumer, spurious wakeups [1] might signal the
thread without any elements in the queue.
[1] http://en.wikipedia.org/wiki/Spurious_wakeup