Checking the right way if a method is invoked from the main thread. The GCD documentation states: (dispatch/queue.h)
When dispatch_get_current_queue() is called on the main thread, it may
or may not return the same value as dispatch_get_main_queue(). Comparing
the two is not a valid way to test whether code is executing on the
main thread.
Checking the right way if a method is invoked from the main thread. The GCD documentation states: (
dispatch/queue.h
)