回想一下同步、异步,多线程,任务队列之间到底有何区别。
NSLog(@"🔥🔥🔥🔥🔥");
// 延迟锚中
dispatch_async(dispatch_get_main_queue(), ^{
[self handleHeaderSelected];
NSLog(@"🐸🐸🐸");
});
//// Log
2021-12-30 21:55:41.302260+0800[24264:9584922] 🔥🔥🔥🔥🔥
2021-12-30 21:55:41.303565+0800[24264:9584922] 🔥🔥🔥🔥🔥
2021-12-30 21:55:41.304549+0800[24264:9584922] 🔥🔥🔥🔥🔥
2021-12-30 21:55:41.305520+0800[24264:9584922] 🔥🔥🔥🔥🔥
2021-12-30 21:55:41.350821+0800[24264:9584922] 🐸🐸🐸
2021-12-30 21:55:41.359901+0800[24264:9584922] 🐸🐸🐸
2021-12-30 21:55:41.362789+0800[24264:9584922] 🐸🐸🐸
2021-12-30 21:55:41.365382+0800[24264:9584922] 🐸🐸🐸
网友评论