Multiple NSThreads synchronization
问题 I want to achieve the following task using NSThread I've a main thread and three (3) workerThread T1, T2, T3. All these started at the same time from main thread, Main thread has an int size variable. Now I want to synchronize all three threads in a way they, when my each of the above threads will execute, it will print the following: //in main thread - (void) mainFunction{ size = 0; NSThread* T1 = [[NSThread alloc] initWithTarget:self selector:@selector(workerThread:) object:@"T1"]; [T1