Add comments clarifying thread-safety (#282)

This commit is contained in:
Dmitry Kovba
2025-09-08 23:15:22 -07:00
committed by GitHub
parent 9aa552593b
commit 1b1cfdbaf3
6 changed files with 8 additions and 5 deletions
@@ -53,6 +53,7 @@ public final class AsyncSignalHandler: Sendable {
struct State: Sendable {
var conts: [AsyncStream<Int32>.Continuation] = []
// `sources` isn't used concurrently.
nonisolated(unsafe) var sources: [any DispatchSourceSignal] = []
}