I want to process an ordered array of tasks on a background thread,Any advice, pointers, examples?
I want to process an ordered array of tasks on a background thread, one by one (sync) and without blocking anything I don’t need to. Tasks are network bound so I want to suspend the retries if network is unavailable and backoff them if there is an error, and never advance to N + 1 if N has not been cleared up (e.g. removed from the list). Any advice, pointers, examples?
No any search results
You already invited:
1 Answers
Paul Williamson
Upvotes from:
the only catch is, that NSOperation is sync, so you have to add implementation of Asyncrhonous nature
here is the code: https://github.com/richardtin/ ... tions
this is apple’s example from WWDC 2015 https://nsscreencast.com/episo ... ions.
alternatively you can take a look at this: https://cocoapods.org/pods/Operations