Limboy
Concurrency Step-by-Step: A Network Request

When I was first learning to program I had absolutely no idea what I was doing. I was using C, and I remember desperately putting in * and & characters until things compiled. But, this was pre-Mac OS X. Upon running my horrifically incorrect programs, half the time the screen would become corrupted and the mouse would stop moving. I’d then have to reboot the whole machine via a physical switch. This was … frustrating.

这篇文章通过一个简单直观的场景(从网络加载图片并展示),演示了 Swift Concurrency 和使用 GCD 的差异。会涉及到基本的 Swift Concurrency 概念(如 @MainActory, isolation, async/await 等),没有太深入,但能知道大概是怎么回事,以及如何使用。对于刚接触 Swift 并发的同学来说,非常友好。