mindsnacks / Zinc-ObjC

Objective-C client for Zinc asset distribution system
MIT License
17 stars 6 forks source link

Set refresh timer on the main thread #59

Closed marksands closed 11 years ago

marksands commented 11 years ago

In ZincActivityMonitor.m, if the refreshTimer is not set on the main thread, it won't fire. I found this out the hard way.

I wrapped it in a dispatch_async block, but feel free to use a better solution.

JaviSoto commented 11 years ago

Actually this might be problematic if stopMonitoring (which BTW, if it's not called, objects of this class leak for ever) isn't called from the main thread. See this Stackoverflow question.

JaviSoto commented 11 years ago

https://github.com/mindsnacks/MSWeakTimer

marksands commented 11 years ago

NSTimer :arrow_right: MSWeakTimer

:shipit: