Instance Method

signal()

Signals (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(_:_:).

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software