I’m regularly getting some callbacks that I need to process on other thread, and I would like to queue those processing methods on one thread, so they would run in a order. I don’t want to use raw NSThread (because there’s too much work) and don’t wan to use GCD (because need to support iOS 3.1). Started to look at NSOperation but there’s a need to subclass, pass needed data and etc. Then started to think about runLoops… Anyway, what are the convenient ways for achieving the task?
Share
NSOperation will be cleaner to set up than a run loop. You don’t say what your callbacks are. Are they functions? selectors? blocks? objects?
Your NSOperation subclass only needs to override main and provide a means to pass the callback to the operation.