From e59b35b2e0a2e070483d48a1fb2c3b831477c3fd Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Fri, 29 May 2026 09:52:30 +0200 Subject: [PATCH] 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 --- channels/reliable_channel.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/reliable_channel.nim b/channels/reliable_channel.nim index ac1046c58..11fbefba9 100644 --- a/channels/reliable_channel.nim +++ b/channels/reliable_channel.nim @@ -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