mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibCore: Allow posting stateless events without heap-allocated Event
This patch adds an API for posting a Core::Event::Type to the thread event queue without requiring a full Core::Event object. We use this API to avoid heap allocations for every timer and notifier activation event.
This commit is contained in:
committed by
Andreas Kling
parent
23fb9781d1
commit
69515f8c85
Notes:
github-actions[bot]
2025-12-03 12:27:51 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/69515f8c854 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7004
@@ -27,6 +27,7 @@ public:
|
||||
|
||||
// Posts an event to the event queue.
|
||||
void post_event(EventReceiver*, NonnullOwnPtr<Event>);
|
||||
void post_event(EventReceiver*, Core::Event::Type);
|
||||
|
||||
// Used by Threading::BackgroundAction.
|
||||
void add_job(NonnullRefPtr<Promise<NonnullRefPtr<EventReceiver>>>);
|
||||
|
||||
Reference in New Issue
Block a user