pthreads signal a specific thread
In pthreads, is it possible for a thread to wake up another thread given only the other thread's id?
(Kind of like, calling pthread_cond_signal() but with also a specific开发者_如何学编程, known, thread id in mind)
You may try using sigaction() and pthread_kill().
See the discussion between @Sam Hocevar and myself in response to this question; the documentation says pthread_kill(3) delivers a signal to a specific thread, and I'm less sure about the Linux implementation sticking true to this requirement.
加载中,请稍侯......
精彩评论