aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/input.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-08-07 22:54:02 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-08-13 08:49:38 -0300
commit502aee690c980fcb3cfcb3f211dcfad06103db46 (patch)
tree803dbcccaa874b78cbdfeacc74b7cc891e09f89a /src/nvim/os/input.c
parenta6e0d35d2da3ee4270ddb712410ea0c8c55b0f0f (diff)
downloadrneovim-502aee690c980fcb3cfcb3f211dcfad06103db46.tar.gz
rneovim-502aee690c980fcb3cfcb3f211dcfad06103db46.tar.bz2
rneovim-502aee690c980fcb3cfcb3f211dcfad06103db46.zip
event: Refactor async event processing
- Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r--src/nvim/os/input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c
index b0263f18d0..8bc713bcff 100644
--- a/src/nvim/os/input.c
+++ b/src/nvim/os/input.c
@@ -132,7 +132,7 @@ bool os_char_avail(void)
// Check for CTRL-C typed by reading all available characters.
void os_breakcheck(void)
{
- if (!disable_breakcheck && !got_int) {
+ if (!got_int) {
loop_poll_events(&loop, 0);
}
}
@@ -292,7 +292,7 @@ static bool input_poll(int ms)
prof_inchar_enter();
}
- LOOP_POLL_EVENTS_UNTIL(&loop, ms, input_ready() || input_eof);
+ LOOP_PROCESS_EVENTS_UNTIL(&loop, NULL, ms, input_ready() || input_eof);
if (do_profiling == PROF_YES && ms) {
prof_inchar_exit();
@@ -383,5 +383,5 @@ static void read_error_exit(void)
static bool pending_events(void)
{
- return events_enabled && !kl_empty(loop.deferred_events);
+ return events_enabled && !queue_empty(loop.events);
}