dispatch main queue swift 4.2 code example Example: main thread swift DispatchQueue.main.async { self.tableView.reloadData() }