Elektrine lite

← Feed

@Catfish_Man@mastodon.social

Post #1205196

2025-11-07 23:30 UTC

I wrote up a little flowchart here for how I think about "is it ok to do this work on the default Swift Concurrency thread pool?": https://forums.swift.org/t/is-concurrent-now-the-standard-tool-for-shifting-expensive-synchronous-work-off-the-main-actor/82976/17 When to make something asynchronous, when to make it parallel, and how parallel to make it are all inherently tricky in extremis, but the default behavior is the default for a reason, and is appropriate in the vast majority of cases. #swiftlang

Replies (2)

  • @boredzo@mastodon.social 2025-11-07 23:39

    @Catfish_Man Also a good rubric outside of Swift and iOS.

    Open ##1414432

  • @jrose@social.belkadan.com 2025-11-07 23:46

    @Catfish_Man “async but on the main actor” is definitely an interesting one for me. I guess as long as you’re not CPU-bound you must have an await somewhere in the task that means you’re yielding for UI stuff to run.

    Open ##1414434