Scheduling fix

This fix should have pollWithEventData yield control to other threads as soon as it finds no data to retrieve. Some multi-threaded applications will react sooner this way, and other applications can optimize the loop if needed.