当与互斥一起使用时,pthreads条件变量可以在线程之间提供基于事件的同步机制,不过这是同步的。
When used along with the Mutex, pthreads conditional variables provide event-based synchronization between threads, but they are synchronous.
条件变量允许线程按照共享资源的一个值同步。
Condition variables allow threads to synchronize to a value of a Shared resource.
为了达到那个目的,线程模块提供了许多同步化的原生支持,包括:锁,事件,条件变量和信号灯。
To that end, the threading module provides a number of synchronization primitives including locks, events, condition variables, and semaphores.
为了达到那个目的,线程模块提供了许多同步化的原生支持,包括:锁,事件,条件变量和信号灯。
To that end, the threading module provides a number of synchronization primitives including locks, events, condition variables, and semaphores.
应用推荐