我使用pthread_create(&thread1, &attrs, //... , //...);并需要一些条件发生需要杀死这个线程如何杀死这个?
pthread_create(&thread1, &attrs, //... , //...);
c multithreading posix pthreads
我使用pthread_create创建了几个子线程.一次,主线程想要杀死所有子线程或者会有段falut.我应该用哪种功能来完成它?我从谷歌搜索了答案,得到了像pthread_kill这样的功能.但是我不知道应该向子线程发送哪个信号来杀死它们.我的运行环境是RHEL 5.4,编程语言是C.
c linux multithreading pthreads
c ×2
multithreading ×2
pthreads ×2
linux ×1
posix ×1