mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge #13743: refactor: Replace boost::bind with std::bind
cb53b825c2scripted-diff: Replace boost::bind with std::bind (Chun Kuan Lee)2196c51821refactor: Use boost::scoped_connection in signal/slot, also prefer range-based loop instead of std::transform (Chun Kuan Lee) Pull request description: Replace boost::bind with std::bind - In `src/rpc/server.cpp`, replace `std::transform` with simple loop. - In `src/validation.cpp`, store the `boost::signals2::connection` object and use it to disconnect. - In `src/validationinterface.cpp`, use 2 map to store the `boost::signals2::scoped_connection` object. Tree-SHA512: 6653cbe00036fecfc495340618efcba6d7be0227c752b37b81a27184433330f817e8de9257774e9b35828026cb55f11ee7f17d6c388aebe22c4a3df13b5092f0
This commit is contained in:
@@ -59,7 +59,6 @@
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
@@ -1237,8 +1236,8 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||
}
|
||||
|
||||
// Start the lightweight task scheduler thread
|
||||
CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler);
|
||||
threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop));
|
||||
CScheduler::Function serviceLoop = std::bind(&CScheduler::serviceQueue, &scheduler);
|
||||
threadGroup.create_thread(std::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop));
|
||||
|
||||
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
|
||||
GetMainSignals().RegisterWithMempoolSignals(mempool);
|
||||
@@ -1646,7 +1645,7 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||
vImportFiles.push_back(strFile);
|
||||
}
|
||||
|
||||
threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles));
|
||||
threadGroup.create_thread(std::bind(&ThreadImport, vImportFiles));
|
||||
|
||||
// Wait for genesis block to be processed
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user