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

Function ExecAsyncConfigureWait

src/backend/executor/execAsync.c:61–82  ·  view source on GitHub ↗

* Give the asynchronous node a chance to configure the file descriptor event * for which it wishes to wait. We expect the node-type specific callback to * make a single call of the following form: * * AddWaitEventToSet(set, WL_SOCKET_READABLE, fd, NULL, areq); */

Source from the content-addressed store, hash-verified

59 * AddWaitEventToSet(set, WL_SOCKET_READABLE, fd, NULL, areq);
60 */
61void
62ExecAsyncConfigureWait(AsyncRequest *areq)
63{
64 /* must provide our own instrumentation support */
65 if (areq->requestee->instrument)
66 InstrStartNode(areq->requestee->instrument);
67
68 switch (nodeTag(areq->requestee))
69 {
70 case T_ForeignScanState:
71 ExecAsyncForeignScanConfigureWait(areq);
72 break;
73 default:
74 /* If the node doesn't support async, caller messed up. */
75 elog(ERROR, "unrecognized node type: %d",
76 (int) nodeTag(areq->requestee));
77 }
78
79 /* must provide our own instrumentation support */
80 if (areq->requestee->instrument)
81 InstrStopNode(areq->requestee->instrument, 0.0);
82}
83
84/*
85 * Call the asynchronous node back when a relevant event has occurred.

Callers 1

ExecAppendAsyncEventWaitFunction · 0.85

Calls 3

InstrStartNodeFunction · 0.85
InstrStopNodeFunction · 0.85

Tested by

no test coverage detected