我想要做的是......
pthread_create(&producer_thread, &to_join, producer_routine, &queue); pthread_detach(producer_thread); ... ... pthread_join(producer_thread, NULL);
这在某种程度上是可行的,在运行上面的代码时,它无法加入线程.
c multithreading mutex pthreads pthread-join
c ×1
multithreading ×1
mutex ×1
pthread-join ×1
pthreads ×1