MCPcopy Create free account
hub / github.com/3rdparty/libprocess / reap_linkee

Method reap_linkee

src/tests/process_tests.cpp:887–902  ·  view source on GitHub ↗

Helper method to quickly reap the `linkee`. Subprocesses are reaped (via a non-blocking `waitpid` call) on a regular interval. We can speed up the internal reaper by advancing the clock.

Source from the content-addressed store, hash-verified

885 // a regular interval. We can speed up the internal reaper by
886 // advancing the clock.
887 void reap_linkee()
888 {
889 if (linkee.isSome()) {
890 bool paused = Clock::paused();
891
892 Clock::pause();
893 while (linkee->status().isPending()) {
894 Clock::advance(process::MAX_REAP_INTERVAL());
895 Clock::settle();
896 }
897
898 if (!paused) {
899 Clock::resume();
900 }
901 }
902 }
903
904 void TearDown() override
905 {

Callers

nothing calls this directly

Calls 3

MAX_REAP_INTERVALFunction · 0.85
isPendingMethod · 0.80
statusMethod · 0.80

Tested by

no test coverage detected