Hi!
"Paul" == Paul McCullagh <paul.mccullagh@primebase.org> writes:
Paul> The intension of this code was to set the priority of the current Paul> running thread only, not the entire program. Paul> If the code is not working in this manner, then there is no better Paul> solution that to disable it. Paul> However it would be nice in the cases where pthread_setschedparam() Paul> does work, that it is called. Agree, but I don't know how to test for this case :( At least on linux, using setpriority() will not work with any modern Linux. Paul> In the current code, pthread_setschedparam() is called when Paul> pth_min_priority != pth_max_priority. Current code ? Do you mean that this has been changed recently ? (It was not a long time ago when we merged with the latest pbxt, so I assumed we have the latest code already). The pbxt code in the MariaDB tree is bascily: (from xt_p_set_low_priority()): if (pth_min_priority == pth_max_priority) setpriority() else pth_set_priority() It's the call to setpriority() that should be avoided in all cases. Don't see how to fix this for linux except by adding an ifdef around the call to setpriority(). Do you know of any system, except old obsolete linux systems, where one should use setpriority() to set the priority for a thread? Regards, Monty PS: Sorry for the delayed answer but I have been on vacation...