objective c - Is -[NSOperationQueue currentQueue] reliable? -
i know gcd's dispatch_get_current_queue has been deprecated, , it anti-pattern use callbacks anyway, -[nsoperationqueue currentqueue]
reliable use, or suffer same problems gcd's dispatch_get_current_queue has? (i want can assert i'm on proper queue when operation executes.)
dispatch_get_current_queue not deprecated because it's unreliable. it's deprecated because uses of other assertions bad idea, , because there can more 1 simultaneous current queue.
nsoperationqueue not support target queues or synchronous execution, 2 reasons latter issue exists in dispatch, should fine use assertions.
Comments
Post a Comment