Quantcast
Channel: Background thread NSRunloop run does not exit after NSTimer is invalidated! Why? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by jscs for Background thread NSRunloop run does not exit after NSTimer is invalidated! Why?

$
0
0

From the -[NSRunLoop run] docs:

Manually removing all known input sources and timers from the run loop is not a guarantee that the run loop will exit.

You should use a different method, possibly runMode:beforeDate: in a loop, and, at the same time you invalidate the timer, set a flag indicating that the run loop should end.


Viewing all articles
Browse latest Browse all 4

Trending Articles