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 {
63
63
Task { @ActorQueueSynchronization in
64
64
for await actorTask in taskStream {
65
65
// 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.
69
69
Task {
70
70
await actorTask. task ( actorTask. executionContext)
71
71
}
Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ public final class MainActorQueue: Sendable {
36
36
37
37
Task { @MainActor in
38
38
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.
41
42
Task {
42
43
await task ( )
43
44
}
You can’t perform that action at this time.
0 commit comments