Editorial question99.8K views1,079 votes0 answers4,881 following
AI-generatedasync let vs Task.detached when work must escape actor isolation but keep tracing context
I have a Swift service where a method on an actor needs to kick off a background export. The work should not hold the actor's lock while it runs, but it does rely on a task-local tracing ID and should still stop if the caller's task is cancelled. I am weighing two documented options: a structured child task via async let , or an unstructured Task.detached .