Re: Recurrent background thread

2016-05-13 Thread Jens Alfke
> On May 13, 2016, at 12:34 PM, Carl Hoefs > wrote: > > As a test, the above works if run on the main thread, so I'm guessing it has > something to do with there being no runloop after the background thread > exits. Yup. More precisely, the background thread has no runloop at all. Its top-l

Re: Recurrent background thread

2016-05-13 Thread Carl Hoefs
Thanks! I knew I was doing it the /old/ way! -Carl > On May 13, 2016, at 12:56 PM, Doug Hill wrote: > > I’ve had luck using dispatch queues to accomplish recurring events, > specifically dispatch_after. For example: > > - (void) doStuffAfterDelay > { >dispatch_queue_t theQueue = dispatch_

Re: Recurrent background thread

2016-05-13 Thread Doug Hill
I’ve had luck using dispatch queues to accomplish recurring events, specifically dispatch_after. For example: - (void) doStuffAfterDelay { dispatch_queue_t theQueue = dispatch_queue_create("Recurring work queue", DISPATCH_QUEUE_SERIAL); dispatch_time_t futureTime = dispatch_time(DISPATCH_

Recurrent background thread

2016-05-13 Thread Carl Hoefs
I want a method running on a background thread to reissue itself after it is done processing. How can I do this? I'm using the following code but it runs just once and is never heard from again... // initial invocation from main thread [self performSelectorInBackground:@selector(_checkS