T
T
Tommy322017-02-14 10:18:51
Swift
Tommy32, 2017-02-14 10:18:51

How to run a function on a different thread?

How to run a function on another thread in swift? So that the application does not wait for its execution and does not hang?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
ManWithBear, 2017-02-14
@Tommy32

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question