diff options
author | fanquake <fanquake@gmail.com> | 2020-03-06 15:10:09 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-03-06 15:41:00 +0800 |
commit | 97aadf98d0b890e09eff45535fa13a663f27334d (patch) | |
tree | d1b050b22ae234b07efbcd5254b4b563df8bce7c /src/rpc | |
parent | 3f826598a42dcc707b58224e94c394e30a42ceee (diff) | |
parent | fae86c38bca5c960462e53975314a0749db5d17d (diff) |
Merge #16117: util: Replace boost sleep with std sleep
fae86c38bca5c960462e53975314a0749db5d17d util: Remove unused MilliSleep (MarcoFalke)
fa9af06d91e9357e86863781746f0e78a509967e scripted-diff: Replace MilliSleep with UninterruptibleSleep (MarcoFalke)
fa4620be782c2bf6b5ffddf4f671194fdd1536f3 util: Add UnintrruptibleSleep (MarcoFalke)
Pull request description:
We don't use the interruptible feature of boost's sleep anywhere, so replace it with the sleep in `std::thread`
ACKs for top commit:
ajtowns:
ACK fae86c38bca5c960462e53975314a0749db5d17d quick code review
practicalswift:
ACK fae86c38bca5c960462e53975314a0749db5d17d -- patch looks correct
sipa:
Concept and code review ACK fae86c38bca5c960462e53975314a0749db5d17d
fanquake:
ACK fae86c38bca5c960462e53975314a0749db5d17d - note that an instance of `DHAVE_WORKING_BOOST_SLEEP_FOR` was missed in the [linter](https://github.com/bitcoin/bitcoin/blob/master/test/lint/extended-lint-cppcheck.sh#L69), but that can be cleaned up later.
Tree-SHA512: 7c0f8eb197664b9f7d9fe6c472c77d384f11c797c913afc31de4b532e3b4fd9ea6dd174f92062ff9d1ec39b25e0900ca7c597435add87f0f2477d9557204848c
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 75baacd6f2..2893aa0e60 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -169,7 +169,7 @@ UniValue stop(const JSONRPCRequest& jsonRequest) // this reply will get back to the client. StartShutdown(); if (jsonRequest.params[0].isNum()) { - MilliSleep(jsonRequest.params[0].get_int()); + UninterruptibleSleep(std::chrono::milliseconds{jsonRequest.params[0].get_int()}); } return PACKAGE_NAME " stopping"; } |