- pthread_create(&priv_->handle, 0, &Private::main_wrapper, this);
+ pthread_create(&_priv->handle, nullptr, &Private::main_wrapper, this);
+}
+
+void Thread::platform_setname()
+{
+#if defined(__GLIBC__) && (__GLIBC__>2 || (__GLIBC__==2 && __GLIBC_MINOR__>=12))
+ if(!_name.empty())
+ pthread_setname_np(_priv->handle, _name.c_str());
+#endif