mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-15 21:41:58 +00:00
LibIPC: Move send thread from IPC connection to the transport layer
By doing this we also make MessagePort, that relies on IPC transport, to send messages from separate thread, which solves the problem when WebWorker and WebContent could deadlock if both were trying to post messages at the same time. Fixes https://github.com/LadybirdBrowser/ladybird/issues/4254
This commit is contained in:
parent
af2dae63d1
commit
14bac7b287
Notes:
github-actions[bot]
2025-04-08 19:10:29 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 14bac7b287
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4276
Reviewed-by: https://github.com/ADKaster
6 changed files with 118 additions and 111 deletions
|
@ -60,16 +60,6 @@ protected:
|
|||
Vector<NonnullOwnPtr<Message>> m_unprocessed_messages;
|
||||
|
||||
u32 m_local_endpoint_magic { 0 };
|
||||
|
||||
struct SendQueue : public AtomicRefCounted<SendQueue> {
|
||||
AK::SinglyLinkedList<MessageBuffer> messages;
|
||||
Threading::Mutex mutex;
|
||||
Threading::ConditionVariable condition { mutex };
|
||||
bool running { true };
|
||||
};
|
||||
|
||||
RefPtr<Threading::Thread> m_send_thread;
|
||||
RefPtr<SendQueue> m_send_queue;
|
||||
};
|
||||
|
||||
template<typename LocalEndpoint, typename PeerEndpoint>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue