资讯

Putting a pthread_mutex_lock () on that same mutex before pthread_cond_signal () will make sure the first thread is waiting (and thus ready to receive the signal) before actually sending the signal.