mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
Mark AckPacer @unchecked Sendable
Its mutable state is confined to the serial pacer queue; the annotation silences the capture-of-non-Sendable warning in the scheduler callback (NostrTransport.swift:123) under the app target's concurrency checking. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,10 @@ final class NostrTransport: Transport, @unchecked Sendable {
|
||||
/// ever hold one item and never pace a burst (flagged by Codex on
|
||||
/// #1398). Production wires `sharedAckPacer` via `Dependencies.live`;
|
||||
/// tests get an isolated instance per `Dependencies` by default.
|
||||
final class AckPacer {
|
||||
/// @unchecked Sendable: all mutable state (`pending`, `isSending`) is
|
||||
/// confined to the serial `queue`; the class is only touched via
|
||||
/// `enqueue` and the scheduler callback, both of which hop onto it.
|
||||
final class AckPacer: @unchecked Sendable {
|
||||
typealias Scheduler = @Sendable (TimeInterval, @escaping @Sendable () -> Void) -> Void
|
||||
|
||||
private let queue = DispatchQueue(label: "chat.bitchat.nostr-ack-pacer")
|
||||
|
||||
Reference in New Issue
Block a user