fShutdownRequested
flag
Use a semaphore to trigger shutdown procedures #13186
pull skeees wants to merge 1 commits into bitcoin:master from skeees:shutdown-cv changing 3 files +11 −4-
skeees commented at 6:49 pm on May 7, 2018: contributorVery simple cleanup to avoid sleep waiting on the
-
Use a semaphore to trigger shutdown procedures c3c665c4a6
-
in src/init.cpp:134 in 1fce55619c outdated
130@@ -131,16 +131,26 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat"; 131 // 132 133 std::atomic<bool> fRequestShutdown(false); 134+std::atomic<bool> fDumpMempoolLater(false);
MarcoFalke commented at 6:53 pm on May 7, 2018:Unused and unrelated?
skeees commented at 6:53 pm on May 7, 2018:must be a stray rebase - will fixskeees force-pushed on May 7, 2018sipa commented at 7:06 pm on May 7, 2018: memberI think this breaks SIGINT/SIGTERM handling.skeees commented at 8:03 pm on May 7, 2018: contributorYes - you’re right :( let me see if there’s an easy safe way to do that, but might be more trouble than its worth.sipa commented at 8:07 pm on May 7, 2018: memberYou can use a condition variable and have a loop with short-timeout waits on it. The signal handlers can’t do anything but set variables, and will need a wait loop, but everything else can use condition variable waking.fanquake added the label Refactoring on May 7, 2018laanwj commented at 5:54 am on May 8, 2018: memberYou can’t use mutexes inside signal handlers. What would work is to create a pipe (and write/read a byte from it).
See also discussion in #10873. e.g. #10873 (review)
laanwj closed this on May 10, 2018
MarcoFalke locked this on Sep 8, 2021Labels
Refactoring
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 00:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 00:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me