Instance Method

signal()

Signals, or increments, a semaphore.

Declaration

@discardableResult func signal() -> Int

Parameters

dsema

The counting semaphore. This parameter cannot be NULL.

Return Value

This function returns non-zero if a thread is woken. Otherwise, zero is returned.

Discussion

Increment the counting semaphore. If the previous value was less than zero, this function wakes a thread currently waiting in dispatch_semaphore_wait(_:_:).