Skip to content

Commit

Permalink
fix: fix scheduler remove
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN authored Jan 29, 2024
1 parent 78e5103 commit d31cfcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ll/api/schedule/Scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ class Scheduler {

bool remove(task_ptr const& task) {
std::lock_guard l{mutex};
return std::erase_if(tasks, [&](auto& t) { return t == task; });
return std::erase_if(tasks, [&](auto& t) { return t.second == task; });
}

bool remove(uint64 id) {
std::lock_guard l{mutex};
return std::erase_if(tasks, [&](auto& t) { return t.getId() == id; });
return std::erase_if(tasks, [&](auto& t) { return t.second.getId() == id; });
}

void clear() {
Expand Down

0 comments on commit d31cfcd

Please sign in to comment.