pth线程问题?
下面程序的线程没有执行(编译通过了),为什么?怎么解决?
#include <pth.h>
void *thread_function(void* arg);
int main()
{
pth_init();
pth_spawn(PTH_ATTR_DEFAULT, thread_function,NULL);
while(1)
{ int i;
printf("nihao\n");
for(i=0;i<100000000;i++);
}
pth_stop();
}
void *thread_function(void * arg)
{ printf("111111111111111111");
}