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

Function ResetCancelConn

src/fe_utils/cancel.c:106–126  ·  view source on GitHub ↗

* ResetCancelConn * * Free the current cancel connection, if any, and set to NULL. */

Source from the content-addressed store, hash-verified

104 * Free the current cancel connection, if any, and set to NULL.
105 */
106void
107ResetCancelConn(void)
108{
109 PGcancel *oldCancelConn;
110
111#ifdef WIN32
112 EnterCriticalSection(&cancelConnLock);
113#endif
114
115 oldCancelConn = cancelConn;
116
117 /* be sure handle_sigint doesn't use pointer while freeing */
118 cancelConn = NULL;
119
120 if (oldCancelConn != NULL)
121 PQfreeCancel(oldCancelConn);
122
123#ifdef WIN32
124 LeaveCriticalSection(&cancelConnLock);
125#endif
126}
127
128
129/*

Callers 13

consumeQueryResultFunction · 0.85
wait_on_slotsFunction · 0.85
CheckConnectionFunction · 0.85
PSQLexecFunction · 0.85
PSQLexecWatchFunction · 0.85
ProcessResultFunction · 0.85
SendQueryFunction · 0.85
do_connectFunction · 0.85
do_lo_exportFunction · 0.85
do_lo_importFunction · 0.85
do_lo_unlinkFunction · 0.85

Calls 1

PQfreeCancelFunction · 0.85

Tested by

no test coverage detected