diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-10-31 07:36:08 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-10-31 08:03:49 -0300 |
commit | 0dac6660985dee7c5515b9b5a91e4ed66d151bc2 (patch) | |
tree | 1cc7247e35c4aa46a433f1a632998155c09e2948 /src/nvim/ui_bridge.h | |
parent | ef1d39bbbf960d0b9f07aee333a34239d430a4db (diff) | |
download | rneovim-0dac6660985dee7c5515b9b5a91e4ed66d151bc2.tar.gz rneovim-0dac6660985dee7c5515b9b5a91e4ed66d151bc2.tar.bz2 rneovim-0dac6660985dee7c5515b9b5a91e4ed66d151bc2.zip |
ui_bridge: Fix race condition that results in deadlock.
Fixed by waiting until the UI thread finishes processing events. Close #3541.
Diffstat (limited to 'src/nvim/ui_bridge.h')
-rw-r--r-- | src/nvim/ui_bridge.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ui_bridge.h b/src/nvim/ui_bridge.h index 76e9e27989..31b9a69216 100644 --- a/src/nvim/ui_bridge.h +++ b/src/nvim/ui_bridge.h @@ -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) \ |