当pthread_cond_wait被调用后,它解锁互斥量并停止线程的执行。
When invoked, pthread_cond_wait unlocks the mutex and then pauses execution of its thread.
之后它创建一个新的线程同时增量threadcount;在完成之后,它解锁互斥量。
After locking that, it creates a new thread and increments threadcount; after it's done, it unlocks the mutex.
当一个互斥锁被锁定后,它必须被解锁。
应用推荐