title: delay/sleep in Swift is not working
body: <p>I have a problem with the <code>sleep</code> function in Swift code. I'm using <code>import Darwin</code> and <code>usleep(400000)</code>. Some actions before reaching the sleep are blocked and I dont know why. Here a short example from my code:</p>
  
  <pre><code>@IBAction func Antwort4Button(_ sender: Any) {
      if (richtigeAntwort == "4"){
          Antwort4.backgroundColor = UIColor.green
          Ende.text = "Richtig!"
  
          NaechsteFrage()
      }
      else {
          Ende.text = "Falsch!"
  
          //NaechsteFrage()
      }
  }
  
  func NaechsteFrage() {
      usleep(400000)
  
      Antwort1.backgroundColor = UIColor.red
      Antwort2.backgroundColor = UIColor.red
      Antwort3.backgroundColor = UIColor.red
      Antwort4.backgroundColor = UIColor.red
  
      Ende.text = ""
  
      FragenSammlung()
  }
  </code></pre>
  
  <p>This lines will be not executed:</p>
  
  <pre><code>Antwort4.backgroundColor = UIColor.green
  
  Ende.text = "Richtig!"
  </code></pre>
  
  <p>Why is calling sleep blocking these actions? If I delete the <code>import Darwin</code> and the <code>sleep</code>, my code works fine. Has anyone an idea? Sorry for my bad english :P</p>