]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/unix/thread.cpp
Add an interface for naming threads
[libs/core.git] / source / core / unix / thread.cpp
index 26afeefc4300e0955b52ca72931c1c2b63eb0d16..3c17a9aabc8054c423253c115ba803325dc3de62 100644 (file)
@@ -20,4 +20,10 @@ void Thread::platform_launch()
        pthread_create(&priv_->handle, 0, &Private::main_wrapper, this);
 }
 
+void Thread::platform_setname()
+{
+       if(!name_.empty())
+               pthread_setname_np(priv_->handle, name_.c_str());
+}
+
 } // namespace Msp