* Mark this node as "stopped." When ExecProcNode() is called on a * stopped motion node it should behave as if there are no tuples * available. * * ExecProcNode() on a stopped motion node should also notify the * "other end" of the motion node of the stoppage. * * Note: once this is called, it is possible that the motion node will * never be called again, so we *must* send the stop message
| 1386 | * never be called again, so we *must* send the stop message now. |
| 1387 | */ |
| 1388 | void |
| 1389 | ExecSquelchMotion(MotionState *node, bool force) |
| 1390 | { |
| 1391 | Motion *motion; |
| 1392 | |
| 1393 | AssertArg(node != NULL); |
| 1394 | if (node->ps.squelched) |
| 1395 | return; |
| 1396 | motion = (Motion *) node->ps.plan; |
| 1397 | node->stopRequested = true; |
| 1398 | node->ps.state->active_recv_id = -1; |
| 1399 | |
| 1400 | /* pass down */ |
| 1401 | SendStopMessage(node->ps.state->motionlayer_context, |
| 1402 | node->ps.state->interconnect_context, |
| 1403 | motion->motionID); |
| 1404 | node->ps.squelched = true; |
| 1405 | } |
no test coverage detected