Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Condition variable?

Definition 15.11 University Computer Science — Year 2 · Capítulo 15 — Threads and Synchronisation

A condition variable lets a thread holding a lock wait for a condition on the data the lock protects. pthread_cond_wait(&c, &m) releases m and puts the thread to sleep, in one step; when another thread calls pthread_cond_signal(&c) (wake one waiter) or pthread_cond_broadcast(&c) (wake all), the sleeper wakes and takes m again before returning.

Leer en el capítulo →