【发布时间】:2014-06-25 05:11:23
【问题描述】:
如果线程被分离,它是否符合 pthread_create() 函数的线程 ID 参数在堆栈上?例如
void func()
{
pthread_t thread;
pthread_create(&thread, NULL, start_func, NULL);
pthread_detach(thread);
}
或者thread-ID变量的消失会导致问题吗?我已阅读标准,但找不到答案。
【问题讨论】:
-
@this,答案是一样的,但我认为问题的性质不同。
-
@merlin2011 不要害怕
Close button。 -
@this,我已经关闭了一些真正重复的问题。 :)