开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜