摘要:
#include <stdio.h>#include <stdlib.h>int flag = 1;void * thr_fn(void * arg) { while (flag){ printf("******\n"); sleep(10); } printf("sleep test thread exit\n");}int main() { pthread_t thread; if (0 != pthread_create(&thread, NULL, thr_fn, NULL)) { printf("err 阅读全文