fix(Scripts/ShadowLabyrinth): Update Murmur script (#15970)

Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com>
This commit is contained in:
Skjalf
2023-04-17 00:19:12 -03:00
committed by GitHub
parent 8aa2a2ac0f
commit 5dcea531b5
6 changed files with 238 additions and 157 deletions

View File

@@ -107,6 +107,11 @@ void TaskScheduler::Dispatch(success_t const& callback)
callback();
}
bool TaskScheduler::IsGroupScheduled(group_t const group)
{
return _task_holder.IsGroupQueued(group);
}
void TaskScheduler::TaskQueue::Push(TaskContainer&& task)
{
container.insert(task);
@@ -159,6 +164,19 @@ void TaskScheduler::TaskQueue::ModifyIf(std::function<bool(TaskContainer const&)
container.insert(cache.begin(), cache.end());
}
bool TaskScheduler::TaskQueue::IsGroupQueued(group_t const group)
{
for (auto const& task : container)
{
if (task->IsInGroup(group))
{
return true;
}
}
return false;
}
bool TaskScheduler::TaskQueue::IsEmpty() const
{
return container.empty();