F4MP/codigos originales/tiltedcode/Code/client/Services/Generic/RunnerService.cpp
2026-01-06 18:53:59 +01:00

20 lines
415 B
C++

#include <TiltedOnlinePCH.h>
#include <Services/RunnerService.h>
#include <Events/UpdateEvent.h>
RunnerService::RunnerService(entt::dispatcher& aDispatcher) noexcept
: m_dispatcher(aDispatcher)
{
}
void RunnerService::Queue(std::function<void()> aFunctor) noexcept
{
m_runner.Add(std::move(aFunctor));
}
void RunnerService::OnUpdate(const UpdateEvent& acUpdateEvent) noexcept
{
m_runner.Drain();
}