Use a different method to process OS events in blocking mode
rather than using a boolean flag to chose between the two ways of processing.