Seems like an async stream would be needed for that
https://forums.swift.org/t/passing-values-to-an-task-actor-in-serial-manner/64706
Passing values to an Task/Actor in serial manner
Hi, I have a really simple code, which send some values from synchronous func to async func. Values received in async func are not in order. func sendValues() { for i in 0..<1000 { Task { await count(i) } } } func count(_ value: Int) async { print(value) // values received NOT in order } As far as I know unstructured Tasks are scheduled on global concurrent executor so may execute in any order. But why async...