MCPcopy Create free account
hub / github.com/TuGraph-family/tugraph-db / Kill

Method Kill

src/plugin/python_plugin.h:122–133  ·  view source on GitHub ↗

==================== The following three methods all try to modify the process handle. So only one successful invocation is allowed. Otherwise, later invocation results in undefined behavior.

Source from the content-addressed store, hash-verified

120 // So only one successful invocation is allowed. Otherwise, later
121 // invocation results in undefined behavior.
122 void Kill(bool force = false) {
123 if (killed_) return;
124 if (force) {
125 process_->kill(false);
126 while (!process_->try_get_exit_status(exit_code_)) {
127 fma_common::SleepS(0.1);
128 process_->kill(true);
129 }
130 } else {
131 process_->kill(false);
132 }
133 }
134
135 int Wait() {
136 if (killed_) return exit_code_;

Callers 6

CallInternalMethod · 0.45
KillAllProcessesMethod · 0.45

Calls 3

SleepSFunction · 0.85
killMethod · 0.45
try_get_exit_statusMethod · 0.45

Tested by

no test coverage detected