#include <stdio.h>
#include <pthread.h>
void* func1(){
while(1){
printf("this is fun 1\n");
sleep(1);
}
}
int main(){
pthread_t th;
pthread_create(&th,NULL,func1,NULL);
while(1){
printf("this is main\n");
sleep(1);
}
return 0;
}
Linux环境下的C多线程模板
最新推荐文章于 2024-10-01 08:56:16 发布