X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fthread.cpp;h=721e8cfef51f2ff772c304ff9ece65554c3f033a;hp=d2451a0d819187e67f0ea41340720e62ac7f3a4a;hb=a4596d1c2f627e4568eb6c01d81b6e45f488715a;hpb=1fd05fc0d04adf7441ed3a83089e3b8716a72c20 diff --git a/source/core/thread.cpp b/source/core/thread.cpp index d2451a0..721e8cf 100644 --- a/source/core/thread.cpp +++ b/source/core/thread.cpp @@ -6,8 +6,9 @@ using namespace std; namespace Msp { -Thread::Thread(): +Thread::Thread(const string &name): priv_(new Private), + name_(name), state_(PENDING) { } @@ -48,6 +49,7 @@ void Thread::launch() ThreadReturn THREAD_CALL Thread::Private::main_wrapper(void *arg) { Thread *thread = reinterpret_cast(arg); + thread->platform_setname(); thread->main(); thread->state_ = FINISHED; return 0;