我会通过教程: https://www.raywenderlich.com/148513/grand-central-dispatch-tutorial-swift-3-part-1是DispatchQueue.global(QOS:.userInteractive).async一样DispatchQueue.main.async
和整个QoS等级用户交互的定义来了。 其中提到,这应该在主线程上运行。 所以,我的问题是,那么是什么
DispatchQueue.global(qos: .userInteractive).async{}
和
DispatchQueue.main.async{}
感谢之间的差别!
我试过了断点实验......它显示不同的线程...... 但是我在Stackoverflow中遇到了这个帖子.. https://stackoverflow.com/questions/44324595/difference-between-dispatchqueue-main- async-and-dispatchqueue-main-sync/44324968#44324968 这里还有人写道,两者都是一样的。 –