ios - Get underlying dispatch_queue_t from NSOperationQueue -


i seem have confusion between dispatch_queue_t , nsoperationqueue queues.

by default, afnetworking's afimagerequestoperation execute success callback block on application's main thread. change this, afhttprequestoperation has property successcallbackqueue lets choose on queue run callback.

i'm trying execute success callback on same background queue / background threads did http request. instead of returning main thread, nsoperationqueue ran http request should run callback well, since there heavy calculations need using of returned images.

my first try set successcallbackqueue nsoperationqueue instance on afimagerequestoperation ran. however, successcallbackqueue property of type dispatch_queue_t, need way underlying dispatch_queue_t of nsoperation instance, if there such thing.

is possible, or need create separate dispatch_queue_t?

the reason ask: it's strange afnetworking inherits nsoperation, expects use dispatch_queue_t queues callbacks. kind of mixing 2 paradigmas dispatch_queue_t , nsoperationqueue.

thanks hints!

there no such thing, there isn't one-to-one correspondence of nsoperationqueue , dispatch_queue_t, queueing concepts in 2 apis different (e.g. nsoperationqueue not have strict fifo queueing gcd does).

the dispatch queue used nsoperationqueue execute code default priority global concurrent queue.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -