Rather than continuously checking to see if my queue has a message, I provide a sleep function that waits 30 seconds in the event that no message was retrieved.
我没有不断检查看我的队列是否有消息,我提供了一个休眠函数,如没有检索到消息就等待30秒。
h; it puts the calling process to sleep killably in queue until the condition evaluates to true.
它将处于可终止睡眠状态的调用进程置于queue 中,直到condition等于true。
All threads that go to sleep from calling pthread_mutex_lock on an already-locked mutex will "queue up" for access to that mutex.
对已锁定的互斥对象上调用pthread _ mutex_lock的所有线程都将进入睡眠状态,这些睡眠的线程将“排队”访问这个互斥对象。
They are used when an operation on a message queue deems the process go into a sleep state (i. e. queue is full and the process is waiting for an opening).
他们认为一个消息队列上的操作过程中进入睡眠状态(即队列已满,该进程正在等待开口)时使用。
Thread sleep time when the refs queue is empty: the time that each thread sleeps when the refs queue is empty.
线程睡眠时间当裁判队列为空:每个线程的时间睡觉当裁判队列是空的。
Thread sleep time when the refs queue is empty: the time that each thread sleeps when the refs queue is empty.
线程睡眠时间当裁判队列为空:每个线程的时间睡觉当裁判队列是空的。
应用推荐