mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-28 01:59:35 +01:00
scheduler: Replace stop(true) with StopWhenDrained()
This helps understanding the code at the call site without having to look up the name of the argument or the default value.
This commit is contained in:
@@ -68,18 +68,6 @@ void CScheduler::serviceQueue()
|
||||
newTaskScheduled.notify_one();
|
||||
}
|
||||
|
||||
void CScheduler::stop(bool drain)
|
||||
{
|
||||
{
|
||||
LOCK(newTaskMutex);
|
||||
if (drain)
|
||||
stopWhenEmpty = true;
|
||||
else
|
||||
stopRequested = true;
|
||||
}
|
||||
newTaskScheduled.notify_all();
|
||||
}
|
||||
|
||||
void CScheduler::schedule(CScheduler::Function f, std::chrono::system_clock::time_point t)
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user