Post #2625581
2026-04-30 15:10 UTC
@mattiem@mastodon.social In which kinds of circumstances are fire-and-forget tasks acceptable? When a view’s button handler wants to call an async method for short-lived work it seems weird to spin up a task, but it’s easy and convenient. Keeping track of every task is a lot of overhead.
Replies (1)
-
@mattiem@mastodon.social 2026-04-30 15:34
@sjs@techhub.social hmm, I don't think you need to be too dogmatic about this. But it's a last resort. Pushing the task creation up as far as it can go is usually a good strategy. But eventually (like a button) there are limits. I also think it is bizarre that SwiftUI has no AsyncButton. Everyone needs this.