Build fix for OS X.
Fix: Only take one work item from the event queue per iteration.