MCPcopy
hub / github.com/jackc/pgx / signalMessage

Method signalMessage

pgconn/pgconn.go:572–588  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570}
571
572func (pgConn *PgConn) signalMessage() chan struct{} {
573 if pgConn.bufferingReceive {
574 panic("BUG: signalMessage when already in progress")
575 }
576
577 pgConn.bufferingReceive = true
578 pgConn.bufferingReceiveMux.Lock()
579
580 ch := make(chan struct{})
581 go func() {
582 pgConn.bufferingReceiveMsg, pgConn.bufferingReceiveErr = pgConn.frontend.Receive()
583 pgConn.bufferingReceiveMux.Unlock()
584 close(ch)
585 }()
586
587 return ch
588}
589
590// ReceiveMessage receives one wire protocol message from the PostgreSQL server. It must only be used when the
591// connection is not busy. e.g. It is an error to call [PgConn.ReceiveMessage] while reading the result of a query. The messages

Callers 1

CopyFromMethod · 0.95

Calls 1

ReceiveMethod · 0.45

Tested by

no test coverage detected