ASDataController’s completedNodes is accessed by treating the main thread as a serial queue. The *problem* is, operations can cut in line by being added while on the main thread. I.e. it just calls the block instead of dispatch_async’ing to the main thread. This results in data inconsistency.
To address this, I've added a queue of operations which get run serially (not to be confused with a serial dispatch queue). Instead of running blocks directly on the main thread, if it’s called while not on the main thread, it dispatch_asyncs to the main thread and runs any blocks in the queue. If it *is* on the main thread, it runs any blocks already in the queue and then runs the block.