Skip to content

Commit 89a0a99

Browse files
committed
Better comment
1 parent fd91b2c commit 89a0a99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/AsyncQueue/ActorQueue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public final class ActorQueue<ActorType: Actor>: @unchecked Sendable {
6464
_ operation: sending @escaping (isolated ActorType) async -> Void,
6565
in context: isolated ActorType
6666
) {
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.
6868
// Since we're running on our actor's context already, we can just dispatch a Task to get first-enqueued-first-start task execution.
6969
Task {
7070
await operation(context)
@@ -73,7 +73,7 @@ public final class ActorQueue<ActorType: Actor>: @unchecked Sendable {
7373

7474
Task {
7575
// 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.
7777
for await actorTask in taskStream {
7878
// Await switching to the ActorType context.
7979
await beginExecuting(

0 commit comments

Comments
 (0)