mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02: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:
parent
fa9cca0550
commit
fac43f9889
3 changed files with 15 additions and 19 deletions
|
|
@ -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)
|
||||
{
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue