-
If I spawn a secondary thread and the threaded method calls other methods, are those methods run in the secondary thread or the main thread?
-
Is there a way to determine on which thread a specified piece of code is being run?
If I spawn a secondary thread and the threaded method calls other methods, are
Share
All method calls take place in the current thread, unless you do something like
performSelectorInBackground:You can probably tell if you’re running in the main thread by comparing
[NSRunLoop currentRunLoop]to[NSRunLoop mainRunLoop]See also: Threading Programming Guide