1

In Apple's implement for CFRunloop,in function __CFRunLoopRun they define a local var named pool:

Boolean poll = sourceHandledThisLoop || (0ULL == timeout_context->termTSR);

And then they used this value like this:

if (!poll && (rlm->_observerMask & kCFRunLoopBeforeWaiting)) 
  __CFRunLoopDoObservers(rl, rlm, kCFRunLoopBeforeWaiting);

if (!poll && (rlm->_observerMask & kCFRunLoopAfterWaiting))  
  __CFRunLoopDoObservers(rl, rlm, kCFRunLoopAfterWaiting);

What does poll means in this context?Why poll is a special case in the runloop flow?

Karl
  • 665
  • 4
  • 19

0 Answers0