File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public final class ActorQueue<ActorType: Actor>: @unchecked Sendable {
64
64
_ operation: sending @escaping ( isolated ActorType) async -> Void ,
65
65
in context: isolated ActorType
66
66
) {
67
- // In Swift 6, a `Task` enqueued from an actor begins executing immediately on that global actor.
67
+ // In Swift 6, a `Task` enqueued from an actor begins executing immediately on that actor.
68
68
// Since we're running on our actor's context already, we can just dispatch a Task to get first-enqueued-first-start task execution.
69
69
Task {
70
70
await operation ( context)
@@ -73,7 +73,7 @@ public final class ActorQueue<ActorType: Actor>: @unchecked Sendable {
73
73
74
74
Task {
75
75
// In an ideal world, we would isolate this `for await` loop to the `ActorType`.
76
- // However, there's no good way to do that just yet .
76
+ // However, there's no good way to do that without retaining the actor and creating a cycle .
77
77
for await actorTask in taskStream {
78
78
// Await switching to the ActorType context.
79
79
await beginExecuting (
You can’t perform that action at this time.
0 commit comments