On Sunday 25 February 2007 04:29, David L. Rager wrote:
> Hello SBCL Help,
> Would someone mind please clarifying a specific question I have on
> how signaling of a condition variable works in SBCL?
> Suppose there are two threads waiting on a condition variable, namely
> *cv*. Suppose a third thread signals *cv* once, and before the signal
> is received by either of the two waiting threads, the third thread
> signals *cv* again. Can we be assured that each thread will receive
> a signal? Is it possible that one of the signals will be lost?
The phrase "before the signal is received" is confusing because we are
not talking about posix signals. On linux condition-notify is
implemented in terms of futex wake. But, yes, each thread will be woken
up provided that the first one doesn't go back to waititing on this
condvar. Anything else is a bug.
> Thank you,