MCPcopy Create free account
hub / github.com/apache/cloudberry / pqFlushNonBlocking

Function pqFlushNonBlocking

src/interfaces/libpq/fe-misc.c:1050–1059  ·  view source on GitHub ↗

* pqFlushNonBlocking: * * wrapper for pqFlush, used by the dispatcher. * conn will be temporarily set to non-blocking mode, * so that if not all data could be sent on 1st attempt, * pqFlushNonBlocking will return 1 instead of waiting/retrying. * * Return 0 on success, -1 on failure and 1 when not all data could be sent */

Source from the content-addressed store, hash-verified

1048 * Return 0 on success, -1 on failure and 1 when not all data could be sent
1049 */
1050int
1051pqFlushNonBlocking(PGconn *conn)
1052{
1053 int ret;
1054 bool old = conn->nonblocking;
1055 conn->nonblocking = true;
1056 ret = pqFlush(conn);
1057 conn->nonblocking = old;
1058 return ret;
1059}
1060
1061/*
1062 * pqWait: wait until we can read or write the connection socket

Callers 2

PQsendGpQuery_sharedFunction · 0.85

Calls 1

pqFlushFunction · 0.85

Tested by

no test coverage detected