Execute NSOperationQueue mainQueue on main thread#591
Conversation
|
When building with libdispatch, NSOperationQueue should really be backed by libdispatch queues and support the underlyingQueue property (and fix this issue by using the libdispatch main queue as underlying queue for the |
rfm
left a comment
There was a problem hiding this comment.
While I don't think that executing in the main thread is a good or intuitive behavior (to me the main point of an operation queue is to avoid blocking the main thread), I agree that it seems to be the way OSX implements it, and it's easy to work around by creating a new queue.
|
Thanks Richard. This API is usually used to make block-based APIs like this NSNotificationCenter API run the block on the main thread. |
Currently [NSOperationQueue mainQueue] is just a normal queue, meaning it executes operations on a dedicated thread. However the expectation of this API is that operations get executed on the main thread, as is done with this change.