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

Function wait

src/process.cpp:4040–4066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4038
4039
4040bool wait(const UPID& pid, const Duration& duration)
4041{
4042 process::initialize();
4043
4044 if (!pid) {
4045 return false;
4046 }
4047
4048 // This could result in a deadlock if some code decides to wait on a
4049 // process that has invoked that code!
4050 if (__process__ != nullptr && __process__->self() == pid) {
4051 LOG(ERROR) << "\n**** DEADLOCK DETECTED! ****\nYou are waiting on process "
4052 << pid << " that it is currently executing.";
4053 }
4054
4055 if (duration == Seconds(-1)) {
4056 return process_manager->wait(pid);
4057 }
4058
4059 bool waited = false;
4060
4061 WaitWaiter waiter(pid, duration, &waited);
4062 spawn(waiter);
4063 wait(waiter);
4064
4065 return waited;
4066}
4067
4068
4069void filter(Filter* filter)

Callers 15

~BasicAuthenticatorMethod · 0.70
waitMethod · 0.70
~JWTAuthenticatorMethod · 0.70
~ServerMethod · 0.70
~RouteMethod · 0.70
finalizeMethod · 0.70
~AuthenticatorManagerMethod · 0.70
awaitMethod · 0.70
initializeMethod · 0.70
TEST_FFunction · 0.50
foreachFunction · 0.50
TESTFunction · 0.50

Calls 4

selfMethod · 0.80
initializeFunction · 0.70
spawnFunction · 0.70
waitMethod · 0.45

Tested by 11

TEST_FFunction · 0.40
foreachFunction · 0.40
TESTFunction · 0.40
runMethod · 0.40
TEST_FFunction · 0.40
donateMethod · 0.40
SetUpMethod · 0.40
afterDelayMethod · 0.40
~HttpMethod · 0.40
TESTFunction · 0.40