* 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); */
| 59 | * AddWaitEventToSet(set, WL_SOCKET_READABLE, fd, NULL, areq); |
| 60 | */ |
| 61 | void |
| 62 | ExecAsyncConfigureWait(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. |
no test coverage detected