zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.53k stars 2.34k forks source link

Setting ZMQ_THREAD_PRIORITY to 0 shouldn't nice the threads. #4512 #4558

Closed guill-delacourt closed 1 year ago

guill-delacourt commented 1 year ago

This PR fixes the issue #4512 by checking that the priority set on non-real time threads is strictly positive before doing the nice system call. The documentation is updated accordingly. It also fixes a following remark on errors when a thread is created with the scheduling policy OTHER, but without indicating the priority. The priority must be set to 0, as it cannot inherit the priority of the creator thread if that thread has a real-time priority.