Classswift 6.1.2Dispatch
DispatchSemaphore
class DispatchSemaphoreclass DispatchSemaphoreimport Dispatchclass DispatchObjectprotocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init(value: Int) @discardableResult func signal() -> Int func wait() func wait(timeout: DispatchTime) -> DispatchTimeoutResult func wait(wallTimeout: DispatchWallTime) -> DispatchTimeoutResult