赞
踩
#include <thread>
#include <pthread.h>
std::thread t(funs, args);
pthread_setname_np(t.native_handle(), threadName);
#define _GNU_SOURCE
#include <pthread.h>
pthread_t tid;
pthread_create(&tid, NULL, func, NULL);
pthread_setname_np(tid, threadName)
prctl(PR_SET_NAME, thdName);
注意: 线程名字字符最多16个
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。