title: CFRunLoopWakeUp doesn't work?
body: <p>I have a case where it seems that <code>CFRunLoopWakeUp</code> isn't working. Here's the setup:</p>
  
  <p>I have a "typical" while loop <strong>not</strong> on the main thread that waits for some work to complete:</p>
  
  <pre><code>- (void)someFunc
  {
      self.runLoop = CFRunLoopGetCurrent();
      NSLog(@"Pre loop.");
      while (!self.completed)
      {
          NSLog(@"In loop.");
          NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
          [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
          [pool release];
      }
      NSLog(@"Post loop.");
  }
  </code></pre>
  
  <p>I have a callback function that waits for when some work is done. This is also <strong>not</strong> called from the main thread:</p>
  
  <pre><code>- (void)callback
  {
      NSLog(@"Work completed.");
      self.completed = YES;
  
      // I've checked that CFRunLoopIsWaiting(self.runLoop) here returns true
      CFRunLoopWakeUp(self.runLoop); // Should wake up the waiting run loop, but doesn't!
  }
  </code></pre>
  
  <p>The callback is called, but for some reason, <code>CFRunLoopWakeUp</code> doesn't seem to do anything. Am I missing something obvious? Are there some deep threading issues going on here? Thanks!</p>