Is it possible that background work is skipped?
In Swift a lot of code runs in background threads. But some code has to be done in foreground (main thread).
DispatchQueue.main means you want to call the code inside block {} on main thread. Eg a tableReload.
let tableData = // get freshdata (A)
DispatchQueue.main.async{
// tableReload with the new tableData (B)
}
Is it possible that (in some specific situation) part (B) is executed before part (A)?
Comments
Post a Comment