Function: SB-THREAD:WAIT-ON-SEMAPHORE¶
Decrement the count of SEMAPHORE by N if the count would not be negative.
Else blocks until the semaphore can be decremented. Returns the new count of SEMAPHORE on success.
If TIMEOUT is given, it is the maximum number of seconds to wait. If the count cannot be decremented in that time, returns NIL without decrementing the count.
If NOTIFICATION is given, it must be a SEMAPHORE-NOTIFICATION object whose SEMAPHORE-NOTIFICATION-STATUS is NIL. If WAIT-ON-SEMAPHORE succeeds and decrements the count, the status is set to T.
Lambda list¶
(sb-thread:semaphore &key sb-thread::n sb-thread::timeout sb-thread::notification)