MCPcopy
hub / github.com/redis/go-redis / HasBufferedData

Method HasBufferedData

internal/pool/conn.go:854–859  ·  view source on GitHub ↗

HasBufferedData safely checks if the connection has buffered data. This method is used to avoid data races when checking for push notifications.

()

Source from the content-addressed store, hash-verified

852// HasBufferedData safely checks if the connection has buffered data.
853// This method is used to avoid data races when checking for push notifications.
854func (cn *Conn) HasBufferedData() bool {
855 // Use read lock for concurrent access to reader state
856 cn.readerMu.RLock()
857 defer cn.readerMu.RUnlock()
858 return cn.rd.Buffered() > 0
859}
860
861// PeekReplyTypeSafe safely peeks at the reply type.
862// This method is used to avoid data races when checking for push notifications.

Callers 1

putConnMethod · 0.80

Calls 1

BufferedMethod · 0.80

Tested by

no test coverage detected