線程執行順序之一

一般情況下,線程在主函數創建,函數分配在棧區,遵循先進後出規則,先創建後運行 #include <stdio.h> #include <unistd.h> #include <pthread.h>   int var  = 8;   void *thread_1(void *arg) {     while(1)     {         printf("this is my new threa
相關文章
相關標籤/搜索