This pattern comes up a lot but I can\'t find a straight answer.
An non-critical, un-friendly program might do
while(True): # do some work
You are basically attempting to usurp the job of the OS CPU scheduler. It would likely be much better to simply call os.nice(100) to inform the scheduler that you're very low priority so it can do its job properly.
os.nice(100)