Hi, Is there any way to increase/decrease a thread priority in Python?
Joe said:Hi, Is there any way to increase/decrease a thread priority in Python?
I googled as suggested, and the answer isn't crystal clear. My
impression is that the problem is that a python thread must acquire the
GIL in order to execute, and the strategy for deciding which thread
should get the GIL when multiple threads are waiting for it is not
based on priority. Is that correct?
Peter Hansen said:That's basically correct. I don't actually know what
the strategy is, though I suspect it's either not
formally documented or explicitly not defined, though
for a given platform there may be some non-arbitrary
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.
|Multi-threading in Python vs Java||7|
|Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Not on FX application thread;||0|
|how to use priority queue with multiprocessing||2|
|need data structure to for test results analysis||1|
|Language summit notes||14|
|Tiny yet useful utility||2|
|Problems with serial port interface||6|
|Setting thread priorities||3|