pthread

來源:國語幫 3.24W

函數pthread_cond_wait主要就是用於阻塞線程的,它有兩個參數;第一個是一個指向條件變量的指針,第二個是一個鎖定了的互斥量。

The function primarily used for this is pthread_cond_wait . It takes two arguments; the first is a pointer to a condition variable, and the second is a locked mutex.

pthread

This function is similar to pthread_cond_wait, except that the third argument is the absolute time value until which the reader thread is willing to wait before it gives up.

熱門標籤