Re: Waiting for a future runloop-based callback

2014-10-08 Thread Ken Thomases
On Oct 8, 2014, at 1:45 PM, Jens Alfke wrote: > In some circumstances the program … runs a nested runloop like this: > while (!taskIsComplete) > [[NSRunLoop currentRunLoop] runMode: @"myCustomMode" > beforeDate: [NSDate distantFuture]]; > where taskIsCom

Waiting for a future runloop-based callback

2014-10-08 Thread Jens Alfke
I thought I understood runloops pretty well, but I'm running into a situation that's got me stumped. Basically it involves how to wait (block) for a future message-send that will be queued onto the current runloop. So I've started an asynchronous task that runs on a background thread. When the