title: Populating UITableView with timeout
body: <p>I am creating chatbot application, which imitates real user "typing" status, so after each message there must be 1 second (for example) delay, before application will post second message.</p>
  
  <p>My messaging logic is </p>
  
  <pre><code>    let size = dictionary[key]!.count;
      let pointer = random(lower: 0, upper: UInt32(size) - 1);
      let part = dictionary[key]![pointer];
  
      for row in part {
          if let message = row as? Message {
              self.sendMessage(message: message);
              print("MESSAGE TRIGGERED");
              usleep(1 * 1000 * 1000)
          }
  
          if let question = row as? Question {
  
          }
      }
  </code></pre>
  
  <p>here i am taking random array of Messages (actually strings), and in a loop just adding them to my table, like this</p>
  
  <pre><code>func sendMessage(message: Message) {
      self.tableView.beginUpdates();
  
      let indexPath = IndexPath.init(row: self.log.count, section: 0);
      self.log.insert(
          message,
          at: self.log.count
      );
      self.tableView.insertRows(at: [indexPath], with: UITableViewRowAnimation.fade);
      self.tableView.endUpdates()
      self.tableView.scrollToRow(at: indexPath, at: .bottom, animated: true)
  }
  </code></pre>
  
  <p>problem is, that if there is 10 strings in an array of messages, i see 10 "MESSAGE TRIGGERED" logs in a console, 1 new row, each second, like i planned, but in a table, i don't see any rows for 10 second, and then they all just appears at once. Why?</p>