[問題] linux c裡有可以kill thread的function嗎?

看板LinuxDev作者 (oeoe)時間16年前 (2009/08/21 16:55), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
請問一下各位 在linux c裡有可以kill thread的function嗎? 如下~ 有類似kill_thread(thread_id)????的function嗎? 感謝!!! ----------------------------------------- void Test() { while(1) printf("123\n"); } void main() { int conut = 0; pthread_create(&thread_id, NULL, &Test, NULL); if (conut < 10) sleep(5); //kill_thread(thread_id)???? } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.37.155

08/22 14:25, , 1F
pthread_cancel()
08/22 14:25, 1F

09/04 18:40, , 2F
pthread_kill()
09/04 18:40, 2F
文章代碼(AID): #1AZc4E9Z (LinuxDev)
文章代碼(AID): #1AZc4E9Z (LinuxDev)