Unlocking the mutex happens immediately, but waiting on the condition mycond is normally a blocking operation, meaning that our thread will go to sleep, consuming no CPU cycles until it is woken up.
对互斥对象解锁会立即发生,但等待条件mycond通常是一个阻塞操作,这意味着线程将睡眠,在它苏醒之前不会消耗CPU周期。
Unlocking the mutex happens immediately, but waiting on the condition mycond is normally a blocking operation, meaning that our thread will go to sleep, consuming no CPU cycles until it is woken up.
对互斥对象解锁会立即发生,但等待条件mycond通常是一个阻塞操作,这意味着线程将睡眠,在它苏醒之前不会消耗CPU周期。
应用推荐