diff --git a/sync/gate.go b/sync/gate.go index 1ad6fd3..f5f9fd5 100644 --- a/sync/gate.go +++ b/sync/gate.go @@ -51,7 +51,7 @@ func (this *Gate[T]) Receive () <- chan T { return this.load() } -// Close closes the gate, drains all remaining messages, and closes the channel. +// Close closes the gate, unblocking any send or receive operations. func (this *Gate[T]) Close () error { channel := this.channel.Swap((chan T)(nil)).(chan T) if channel == nil { return ErrAlreadyClosed }