例如:这里会发生什么状况
int main()
{
pthread_create();//此线程陷入死循环
return 0;
}
程序立马结束;
应为pthread_create并不需要等待函数返回;产生一个线程后;继续执行。
例如:这里会发生什么状况
int main()
{
pthread_create();//此线程陷入死循环
return 0;
}
程序立马结束;
应为pthread_create并不需要等待函数返回;产生一个线程后;继续执行。
转载于:https://www.cnblogs.com/ztteng/articles/3182870.html