我C++11启动线程的函数的方式是:
t = std::thread(myfun,this)
请问thread(myfun,this)是否还可以加参数,给这个线程分配名字?比如这样:
t = std::thread(myfun,this,“myThreadName”) 给这个线程取名为:myThreadName”
我C++11启动线程的函数的方式是:
t = std::thread(myfun,this)
请问thread(myfun,this)是否还可以加参数,给这个线程分配名字?比如这样:
t = std::thread(myfun,this,“myThreadName”) 给这个线程取名为:myThreadName”