aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/dispatch.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-30 16:03:58 +0200
committerGitHub <noreply@github.com>2019-06-30 16:03:58 +0200
commit10a533e9d41ad8917c17e96cf696fcea4b07374f (patch)
tree69bcc294d1a956856578e9dfb6d87271b6057729 /src/nvim/api/private/dispatch.h
parent3b504e7c8d20bb41ef6b6f95e46527766438046a (diff)
parent99f24dfbed84cea24fc1d8bb80ab10a2dd3eca0b (diff)
downloadrneovim-10a533e9d41ad8917c17e96cf696fcea4b07374f.tar.gz
rneovim-10a533e9d41ad8917c17e96cf696fcea4b07374f.tar.bz2
rneovim-10a533e9d41ad8917c17e96cf696fcea4b07374f.zip
Merge pull request #10316 from bfredl/cb_safety
luv callbacks: throw error on deferred methods instead of crashing
Diffstat (limited to 'src/nvim/api/private/dispatch.h')
-rw-r--r--src/nvim/api/private/dispatch.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/api/private/dispatch.h b/src/nvim/api/private/dispatch.h
index 39aabd708a..bad5a13934 100644
--- a/src/nvim/api/private/dispatch.h
+++ b/src/nvim/api/private/dispatch.h
@@ -11,8 +11,10 @@ typedef Object (*ApiDispatchWrapper)(uint64_t channel_id,
/// functions of this type.
typedef struct {
ApiDispatchWrapper fn;
- bool async; // function is always safe to run immediately instead of being
- // put in a request queue for handling when nvim waits for input.
+ bool fast; // Function is safe to be executed immediately while running the
+ // uv loop (the loop is run very frequently due to breakcheck).
+ // If "fast" is false, the function is deferred, i e the call will
+ // be put in the event queue, for safe handling later.
} MsgpackRpcRequestHandler;
#ifdef INCLUDE_GENERATED_DECLARATIONS