std::thread - naming your thread
03:28 12 Apr 2012

The new C++ has this std::thread type. Works like a charm. Now I would like to give each thread a name for more easy debugging (like java allows you to). With pthreads I would do:

pthread_setname_np(pthread_self(), "thread_name");

but how can I do this with c++0x? I know it uses pthreads underneath on Linux systems, but I would like to make my application portable. Is it possible at all?

c++ multithreading c++11