Why `AsyncStream` breaks structured concurrency?

Ah-ha! Turns out my assumption that only Task.detached { ... } creates unstructured task was wrong, as Task { ... } also does it, albeit keeping actor and priority.

I really like this solution - this is exactly what I was looking for :+1:

Thank you all for your replies, they were very helpful!

4 Likes