Skip to content

Commit a837a30

Browse files
committed
improved comment about channel finish
1 parent 2513338 commit a837a30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/ServiceLifecycle/ServiceGroup.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,8 @@ public actor ServiceGroup: Sendable, Service {
884884

885885
return .gracefulShutdownFinished
886886
} onCancel: {
887-
// Without this we can get stuck in `addService` if the group
887+
// Once the group is cancelled we will no longer read from the channel.
888+
// This will resume any suspended producer in `addServiceUnlessShutdown`.
888889
channel.finish()
889890
}
890891
}

0 commit comments

Comments
 (0)