mark onReadyToSend msgs as sink to signal consume semantics

PR review noted that an async proc captures parameters into the future's
env, deep-copying `seq[seq[byte]]`. `sink` tells the compiler the callee
consumes msgs, letting it move under arc/orc memory models. Under refc
the change is a no-op but documents intent at the boundary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ivan FB 2026-05-29 09:52:30 +02:00
parent 95f56e653e
commit e59b35b2e0
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -165,7 +165,7 @@ proc onMessageError(self: ReliableChannel, messagingReqId: RequestId) =
self.pruneCompletedChannelReqs()
proc onReadyToSend(
self: ReliableChannel, msgs: seq[seq[byte]]
self: ReliableChannel, msgs: sink seq[seq[byte]]
) {.async: (raises: []).} =
## Tail of the outgoing pipeline. Invoked from the `ReadyToSendEvent`
## listener once `rate_limit_manager` releases a batch of opaque