pthreads的信号特定线程 [英] pthreads signal a specific thread
本文介绍了pthreads的信号特定线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在pthreads的,有可能是一个线程来唤醒另一个线程的只给其他线程的ID 的?
In pthreads, is it possible for a thread to wake up another thread given only the other thread's id?
(有点像,则调用pthread_cond_signal(),但也有特定的,已知的,记住线程ID)
(Kind of like, calling pthread_cond_signal() but with also a specific, known, thread id in mind)
推荐答案
您可以尝试使用的sigaction()
和 pthread_kill()
。
这篇关于pthreads的信号特定线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文