title: dispatch_get_global_queue vs dispatch_get_main_queue
body: <p>Starting to learn about core data and dispatch_async. There is a block of code to get url of image from set of data and set it to model of core data like below</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
                  NSString *urlString = [[[photoDictionary valueForKey:@"images"] objectAtIndex:0] valueForKey:@"url"];
                  NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]];
                  dispatch_async(dispatch_get_main_queue(), ^{
                      [photoModel setValue:imageData forKey:@"photoImageData"];
  </code></pre>
  
  <p>Can somebody explain to me why we use <code>dispatch_get_global_queue</code> for the outer dispatch_async and <code>dispatch_get_main_queue</code> for inner dispatch_async.</p>