自从我和OS类的pthreads玩到现在已经有一年多了,我一直试图回到这个游戏里只是为了好玩。下面是我在上运行的简单线程练习的代码。我担心的是,教程说输出应该是:Thread 2pthread_create() for thread但我得到了
pthread_create() for thread 1 return
下面是一个c程序,我想在其中实现一个线程数组。有两个线程函数。我想在每个函数中发送一个int值。但是代码没有给出任何输出。thread %d",i)
{
{
pthread_create&thread[i],NULL,threadFunc1,(void*)&i ); // want to send the value o