Skip to content

Commit 45e6537

Browse files
committed
Merge #17382: rpc: Remove unused boost::this_thread::interruption_point
fa5facd rpc: Remove unused boost::this_thread::interruption_point (MarcoFalke) Pull request description: There are predefined interruption points for `boost::thread`: https://www.boost.org/doc/libs/1_71_0/doc/html/thread/thread_management.html#interruption_points However, the rpc threads are `std::thread`, which does not have an `std::thread::interrupt` member function to request interruption: https://dev.visucore.com/bitcoin/doxygen/httpserver_8cpp.html#ae1a63374e18b9abd348eb74e4243ea34 Thus, the interruption points can be removed. ACKs for top commit: laanwj: ACK fa5facd, this does nothing. practicalswift: ACK fa5facd jamesob: ACK bitcoin/bitcoin@fa5facd Tree-SHA512: 4e29a44df1f2702cbd1ffdffa559440a8bb800baab64b4116e2c3d27cd64d8d1e8aafe1dc21b1a4e3988470d03be19cae294bd5669f7abf6d487685dc8fd8d7e
2 parents 40b6070 + fa5facd commit 45e6537

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/node/coinstats.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
#include <map>
1616

17-
#include <boost/thread.hpp>
18-
19-
2017
static void ApplyStats(CCoinsStats &stats, CHashWriter& ss, const uint256& hash, const std::map<uint32_t, Coin>& outputs)
2118
{
2219
assert(!outputs.empty());
@@ -52,7 +49,6 @@ bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats)
5249
uint256 prevkey;
5350
std::map<uint32_t, Coin> outputs;
5451
while (pcursor->Valid()) {
55-
boost::this_thread::interruption_point();
5652
COutPoint key;
5753
Coin coin;
5854
if (pcursor->GetKey(key) && pcursor->GetValue(coin)) {

src/rpc/blockchain.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939

4040
#include <univalue.h>
4141

42-
#include <boost/thread/thread.hpp> // boost::thread::interrupt
43-
4442
#include <condition_variable>
4543
#include <memory>
4644
#include <mutex>
@@ -1976,7 +1974,6 @@ bool FindScriptPubKey(std::atomic<int>& scan_progress, const std::atomic<bool>&
19761974
Coin coin;
19771975
if (!cursor->GetKey(key) || !cursor->GetValue(coin)) return false;
19781976
if (++count % 8192 == 0) {
1979-
boost::this_thread::interruption_point();
19801977
if (should_abort) {
19811978
// allow to abort the scan via the abort reference
19821979
return false;

0 commit comments

Comments
 (0)