File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ public final class ActorQueue<ActorType: Actor>: @unchecked Sendable {
6363 Task { @ActorQueueSynchronization in
6464 for await actorTask in taskStream {
6565 // In Swift 6, a `Task` enqueued from a global actor begins executing immediately on that global actor.
66- // Since we're running on a global actor already, we can just dispatch a Task and get FIFO task execution.
67- // In an ideal world, we wouldn't need a global actor and would isolate this `for await` loop on the `ActorType`.
68- // However, there's no good way to do that just yet.
66+ // Since we're running on a global actor already, we can just dispatch a Task to get first-enqueued-first-start
67+ // task execution. In an ideal world, we wouldn't need a global actor and would isolate this `for await` loop on
68+ // the `ActorType`. However, there's no good way to do that just yet.
6969 Task {
7070 await actorTask. task ( actorTask. executionContext)
7171 }
Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ public final class MainActorQueue: Sendable {
3636
3737 Task { @MainActor in
3838 for await task in taskStream {
39- // In Swift 6, a `Task` enqueued from a global actor begins executing immediately on that global actor.
40- // Since we're running on the global main actor already, we can just dispatch a Task and get FIFO task execution.
39+ // In Swift 6, a `Task` enqueued from a global actor begins executing immediately on that global
40+ // actor. Since we're running on the global main actor already, we can just dispatch a Task to
41+ // get first-enqueued-first-start task execution.
4142 Task {
4243 await task ( )
4344 }
You can’t perform that action at this time.
0 commit comments