MCPcopy Create free account
hub / github.com/ElementsProject/elements / wait

Method wait

src/sync.h:287–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 explicit CSemaphore(int init) : value(init) {}
286
287 void wait()
288 {
289 std::unique_lock<std::mutex> lock(mutex);
290 condition.wait(lock, [&]() { return value >= 1; });
291 value--;
292 }
293
294 bool try_wait()
295 {

Callers 15

tree_sha512sumFunction · 0.80
shutdownMethod · 0.80
get_node_outputMethod · 0.80
_test_stopatheightMethod · 0.80
kill_and_joinMethod · 0.80
wait_for_node_exitMethod · 0.80
_stop_perfMethod · 0.80
get_node_outputMethod · 0.80
sigterm_nodeMethod · 0.80
_test_stopatheightMethod · 0.80
wait_for_node_exitMethod · 0.80
_stop_perfMethod · 0.80

Calls

no outgoing calls

Tested by 10

kill_and_joinMethod · 0.64
wait_for_node_exitMethod · 0.64
_stop_perfMethod · 0.64
wait_for_node_exitMethod · 0.64
_stop_perfMethod · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64
~FrozenCleanupCheckMethod · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
TestRpcCommandFunction · 0.64