Skip to content

Commit 201bb14

Browse files
doc(broadcast): added comments to enqueueFast
1 parent cc35674 commit 201bb14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

broadcastcall.go

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ func (c RawConfiguration) BroadcastCall(ctx context.Context, d BroadcastCallData
6464
// or if the receiver is ready. This prevents a slow node from limiting the
6565
// enqueueing of messages to other nodes while still ensuring correct
6666
// ordering of messages.
67+
//
68+
// NOTE: the slow path will be invoked even though we buffer the channel. Hence,
69+
// the enqueueFast will provide a small performance benefit.
6770
enqueued := n.channel.enqueueFast(request{ctx: ctx, msg: &Message{Metadata: md, Message: msg}, opts: o}, replyChan, false)
6871
if !enqueued {
6972
notEnqueued = append(notEnqueued, n)

0 commit comments

Comments
 (0)