Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche.cpp
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | bool AvalancheProcessor::stopEventLoop() { | ||||
if (!running) { | if (!running) { | ||||
return false; | return false; | ||||
} | } | ||||
// Request avalanche to stop. | // Request avalanche to stop. | ||||
stopRequest = true; | stopRequest = true; | ||||
// Wait for avalanche to stop. | // Wait for avalanche to stop. | ||||
cond_running.wait(lock, [this] { return !running; }); | cond_running.wait(lock, [this]() EXCLUSIVE_LOCKS_REQUIRED(cs_running) { | ||||
return !running; | |||||
}); | |||||
stopRequest = false; | stopRequest = false; | ||||
return true; | return true; | ||||
} | } | ||||
std::vector<CInv> AvalancheProcessor::getInvsForNextPoll() const { | std::vector<CInv> AvalancheProcessor::getInvsForNextPoll() const { | ||||
std::vector<CInv> invs; | std::vector<CInv> invs; | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |