mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibCore: Add thread-safe weak deferred_invoke()
Add a thread-safe deferred_invoke() API on WeakEventLoopReference that queues work onto the owning thread's event queue and wakes that thread via EventLoopManager hooks. This avoids calling wake() from foreign threads during teardown. Implement current_thread_handle()/wake_thread() in each backend and track per-thread data so handles are validated before waking: - Unix: wake via per-thread wake pipe - Windows: wake via thread wake event - macOS: wake via stored CFRunLoopRef - Qt: wake via event target or QEventLoop::wakeUp() - Android: wake via stored ALooper
This commit is contained in:
committed by
Andreas Kling
parent
367296fce6
commit
96ce468b60
Notes:
github-actions[bot]
2026-02-06 11:08:22 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/96ce468b601 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7582
@@ -25,6 +25,8 @@ public:
|
||||
virtual void unregister_notifier(Notifier&) override;
|
||||
|
||||
virtual void did_post_event() override;
|
||||
virtual EventLoopThreadHandle current_thread_handle() override;
|
||||
virtual void wake_thread(EventLoopThreadHandle) override;
|
||||
|
||||
virtual int register_signal(int signal_number, Function<void(int)> handler) override;
|
||||
virtual void unregister_signal(int handler_id) override;
|
||||
|
||||
Reference in New Issue
Block a user