sync: Made doc comment on Gate.Close make more sense
This commit is contained in:
		
							parent
							
								
									fd85de4a44
								
							
						
					
					
						commit
						c4e2a0f641
					
				@ -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 }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user