title: global_queue with qos_class_user_interactive
body: <p>I try to understand GCD and wrote this code to find out run priority:</p>
  
  <pre><code>  override func viewDidLoad() {
      super.viewDidLoad()
  
      fetchImage()
      print(1)
  
      dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) {
        print(2)
      }
  
      dispatch_async(dispatch_get_main_queue()) {
        print(3)
      }
      dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0)) { 
        print(5)
      }
    }
  </code></pre>
  
  <p>I got next result in the console:</p>
  
  <blockquote>
    <p>1</p>
    
    <p>2</p>
    
    <p>5</p>
    
    <p>3</p>
  </blockquote>
  
  <p>So the question is:</p>
  
  <p><strong>Part 1</strong>: Why 3 is after 5 (main_queue has highest priority?)</p>
  
  <p><strong>Part 2</strong>: And why 2 is higher that 3 and 5 as well?</p>
  
  <p>Thank you guys!</p>