Eventually I have used asyncAfter feature in swift with no time, and it does some delay and seems different with normal code.
Code with async:
DispatchQueue.main.asyncAfter(deadline: .now() + 0.0 , execute: {
self.updateUI()
})
Normal code:
self.updateUI()
Similar problem with perform selector also.
self.performSelector("onFlip", withObject: nil, afterDelay: 0)
Is that delay is caused because of creating new thread?