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

Popular posts from this blog

Today Walkin 14th-Sept

Network Error and Timeout on Authorize.net JS

Spring Elasticsearch Operations