?? mypthread.c
字號:
#include<stdio.h>
#include<pthread.h>
void mythread(void)
{
int i;
for(i=0;i<1000;i++)
printf("This is a thread!\n");
}
int main(void)
{
pthread_t id;
int i,ret;
ret=pthread_create(&id,NULL,(void *)mythread,NULL);
if(ret!=0)
{
printf("create pthread error!\n");
exit(1);
}
for(i=0;i<1000;i++)
printf("This is the main process1\n");
pthread_join(id,NULL);
return(0);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -