A simple and dirty way to report if you are the only one executing in the stream will rely on insecure static variables:
-(void)concurrentMethod { static NSThread *runningThread = nil; NSThread *myThread = [NSThread currentThread]; if (runningThread != nil) { NSLog(@"Thread %@: running concurrently with %@", runningThread, myThread); } runningThread = myThread; ...
source share