I\'ve got a thread that\'s polling a piece of hardware.
while not hardware_is_ready(): pass process_data_from_hardware()
But there are
time.sleep(0) is sufficient to yield control -- no need to use a positive epsilon. Indeed, time.sleep(0) MEANS "yield to whatever other thread may be ready".
time.sleep(0)