Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 368 Bytes

get-back-on-main-thread.md

File metadata and controls

19 lines (13 loc) · 368 Bytes

Theads

How to get on the background thread

DispatchQueue.global(qos: .background).async {

}

How to get back onto the main thread

Do this if you ever get a warning or error saying that you shouldn't be doing this action while not on the main thread.

DispatchQueue.main.async { [unowned self] in
    self.tableView.reloadData()
}