title: NSOperationQueue waitUntillAllOperationsAreFinished blocks operations
body: <p>I've created my own NSOperation subclass and now I want some of its instances to run in parallel. As it's a concurrent operation I've overwritten</p>
  
  <pre><code>- (void)start {
      [self willChangeValueForKey:@"isExecuting"];
      isExecuting = YES;
      [self didChangeValueForKey:@"isExecuting"];
  
      error=NO;
      startedSection=NO;
  
      // start the task
      [task launch];
  }
  
  - (BOOL)isConcurrent {
      return YES;
  }
  
  - (BOOL)isExecuting {
      return isExecuting;
  }
  
  - (BOOL)isFinished {
      return isFinished;
  }
  </code></pre>
  
  <p>and the following code is executed when the operation finishes:</p>
  
  <pre><code>[self willChangeValueForKey:@"isExecuting"];
  [self willChangeValueForKey:@"isFinished"];
  isExecuting = NO;
  isFinished = YES;
  [self didChangeValueForKey:@"isExecuting"];
  [self didChangeValueForKey:@"isFinished"];
  </code></pre>
  
  <p>When I add <code>[myQueue waitUntillAllOperationsAreFinished]</code> after having added the operations to <code>myQueue</code> none of the operations even starts! When I remove the <code>[myQueue waitUntillAllOperationsAreFinished]</code> I get what I want, except for the fact that this could lead to some errors because of the main thread interfering with these operations ...</p>