Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Last active Jan 8, 2018
Embed
What would you like to do?
let s = DispatchSemaphore(value: 1)
_ = s.wait(timeout: DispatchTime.distantFuture)
// do something
s.signal()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment