title: GCD global concurrent queue not always concurrent(iOS device)?
body: <p>On iOS device, I recently found that a strange behavior.</p>
  
  <p>Code1:</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
      dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
          NSLog(@"1111");
      });
      while (1) {
          sleep(1);
      }
  });
  </code></pre>
  
  <p>Code2:</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
      dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
          NSLog(@"1111");
      });
      while (1) {
          sleep(0.5);
      }
  });
  </code></pre>
  
  <p>Code1 and Code2's only difference is that Code1 sleep 1second every loop and Code2 sleep 0.5.</p>
  
  <p>If you run these two code on iOS device with single core, Code1 will print out the @"1111", but Code2 won't.</p>
  
  <p>I don't why, the global queue is assumed to be concurrent.It should always print out the number no matter what other blocks are doing. And if it is something due to that single core device's limit, why sleep(0.5) and sleep(1) would make the difference?</p>
  
  <p>I really want to know the reason for this.</p>
  
  <p><strong>EDIT</strong>
  I found use sleep(0.5) is my stupid mistake. <code>sleep()</code> function take an unsigned int parameter.So sleep(0.5) is equal to sleep(0). But do sleep(0) will block the whole concurrent queue?</p>