Skip to content

Instantly share code, notes, and snippets.


fitomad/xctest_gcd_1.swift Secret

Created Feb 13, 2019
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
// 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