whenNothingPending recurse on next tick to prevent infinite loop