[英]Pthreads - Can I detach from a thread and then join in main?
我想做的是...
pthread_create(&producer_thread, &to_join, producer_routine, &queue);
pthread_detach(producer_thread);
...
...
pthread_join(producer_thread, NULL);
在某種程度上可以做到這一點,在運行上面的代碼時,它無法加入線程。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.