How can I throttle Python threads?
I have a thread doing a lot of CPU-intensive processing, which seems to be blocking out other threads. How do I limit it? This is for web2py specifically, but a general solution would be fine. I actually just ended up diving into this issue not long ago, you wont be able to change the thread priority but there are ways around this. To give you a bit of background on the problem, in the cPython implementation CPU bound threads can cause other threads to starve because of the way the Global Interpreter Lock or GIL is released and acquired. Oddly enough this problem is made worse in a multicore