Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Creacion de un semaforo
let semaphore: dispatch_semaphore_t = dispatch_semaphore_create(0)
// Liberamos el semaforo.
//La ejecuion puede continuar
dispatch_semaphore_signal(semaphore)
// Este es el punto de bloqueo.
// Aqui esperamos a que se llame
// a la funcion `dispatch_semaphore_signal(sem)`
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.