Untitled attachment
https://files.mastodon.social/media_attachments/files/111/519/805/360/994/418/original/78f997e27daa2f21.png
Swift challenge for the week:
Given the example code, how do you correctly convert it to use Swift Tasks and Structured Concurrency?
Let's avoid discussing how crappy the example code is — the point is that *a lot* of existing "async” UI code has this general form. This general style/convention of code is everywhere.
I think the first thing folks will reach for is replacing the dispatch queues with `Task { }`, but according to WWDC videos and folks that work on the compiler, that is wrong.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.