Instance Method

wait(timeout:)

Waits for, or decrements, a semaphore.

Declaration

func wait(timeout: DispatchTime) -> DispatchTimeoutResult

Parameters

timeout

The latest time to wait for a signal.

Discussion

Decrement the counting semaphore. If the resulting value is less than zero, this function waits for a signal to occur before returning.

See Also

Blocking on the Semaphore

func wait()

Waits for, or decrements, a semaphore.