WAIT-ON-SEMAPHORE could block indefinitely despite :TIMEOUT being supplied
commitaa0389fa59db6ae1b5dcf50d87daa10145a1a4ec
authorJan Moringen <jmoringe@techfak.uni-bielefeld.de>
Sat, 7 Nov 2015 22:59:21 +0000 (7 23:59 +0100)
committerJan Moringen <jmoringe@techfak.uni-bielefeld.de>
Sat, 14 Nov 2015 16:49:59 +0000 (14 17:49 +0100)
tree169cebf9db02ad17ddd0bd7a470ab07e55237160
parent2ad06f05f756aac29880d53d8786614bc026d4e9
WAIT-ON-SEMAPHORE could block indefinitely despite :TIMEOUT being supplied

* The problem was that %DECREMENT-SEMAPHORE did not decrement the
  remaining timeout before calling CONDITION-WAIT again after a spurious
  wakeup.

* To enable this, CONDITION-WAIT, when called with a timeout, now
  returns the remaining time before the requested timeout in case of
  a (potentially spurious) wakeup.

Reported-by: DeadTrickster in #lisp
NEWS
src/code/target-thread.lisp
tests/threads.impure.lisp