LibCore: Don't require heap-allocated event to hold deferred invocation

Instead of creating a DeferredInvocationEvent every time we
deferred_invoke, we now let the QueuedEvent store the invokee Function
object directly.
This commit is contained in:
Andreas Kling 2025-12-03 11:53:04 +01:00 committed by Andreas Kling
parent 69515f8c85
commit 2a1c5dc108
Notes: github-actions[bot] 2025-12-03 12:27:45 +00:00
6 changed files with 28 additions and 17 deletions

View file

@ -149,7 +149,7 @@ void EventLoop::wake()
void EventLoop::deferred_invoke(Function<void()> invokee)
{
m_impl->post_event(nullptr, make<Core::DeferredInvocationEvent>(move(invokee)));
m_impl->deferred_invoke(move(invokee));
}
void deferred_invoke(Function<void()> invokee)