?? thread.c
字號:
#include<stdio.h>
#include<stddef.h>
#include<unistd.h>
#include<pthread.h>
thread1()
{
printf("Iam the thread\n");
sleep(1);
}
main()
{
int ret;
pthread_t id;
ret=pthread_create(&id,NULL,(void*)thread1,NULL);
if(ret!=0)
{
printf("thread_send error\n");
exit(1);
}
while(1)
{
printf("I am the main-thread\n");
sleep(1);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -