diff --git a/src/thread.cpp b/src/thread.cpp index e100556a..84473dca 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -228,7 +228,7 @@ void zmq::thread_t:: return; } #endif - int rc = pthread_getschedparam (_descriptor, &policy, ¶m); + int rc = pthread_getschedparam (pthread_self (), &policy, ¶m); posix_assert (rc); if (_thread_sched_policy != ZMQ_THREAD_SCHED_POLICY_DFLT) { @@ -257,7 +257,7 @@ void zmq::thread_t:: param.sched_priority = -1; #endif - rc = pthread_setschedparam (_descriptor, policy, ¶m); + rc = pthread_setschedparam (pthread_self (), policy, ¶m); #if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) // If this feature is unavailable at run-time, don't abort.