I have an Objective-C class that spins a background thread and starts NSRunLoop. I would like to deliver messages to the background thread from the main thread (yes, exclusively from the main thread). For this, I plan to use the built-in performSelector:onThread:withObject:waitUntilDone:.
I am wondering if it can be assumed that the order in which I send messages this way will be the order in which they are received in the background thread. Obviously, the question is controversial if several threads are calling performSelector:onThread:withObject:waitUntilDone:at about the same time, but since I will only call it from the main thread, do I guarantee an ordered ordering?
source
share