Signals (increments) a semaphore.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Framework
- Dispatch
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
.