mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
ui_bridge: Fix race condition that results in deadlock.
Fixed by waiting until the UI thread finishes processing events. Close #3541.
This commit is contained in:
@@ -22,6 +22,10 @@ struct ui_bridge_data {
|
||||
// the call returns. This flag is used as a condition for the main
|
||||
// thread to continue.
|
||||
bool ready;
|
||||
// When a stop request is sent from the main thread, it must wait until the UI
|
||||
// thread finishes handling all events. This flag is set by the UI thread as a
|
||||
// signal that it will no longer send messages to the main thread.
|
||||
bool stopped;
|
||||
};
|
||||
|
||||
#define CONTINUE(b) \
|
||||
|
Reference in New Issue
Block a user