aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-07-16 23:10:04 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-07-17 00:19:19 -0300
commit991d3ec1e679bb6407f2a5820910d2968424183c (patch)
tree38810fb657e1e1ea9d77b7a7963e874e8bda99d1 /src/nvim/eval.c
parent9e42ef4e1312fb6888d2691e9d979b95dd43ec94 (diff)
downloadrneovim-991d3ec1e679bb6407f2a5820910d2968424183c.tar.gz
rneovim-991d3ec1e679bb6407f2a5820910d2968424183c.tar.bz2
rneovim-991d3ec1e679bb6407f2a5820910d2968424183c.zip
event loop: New abstraction layer with refactored time/signal API
- Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 7da5cfb731..4173acefd9 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -91,8 +91,8 @@
#include "nvim/api/private/helpers.h"
#include "nvim/api/vim.h"
#include "nvim/os/dl.h"
-#include "nvim/os/event.h"
#include "nvim/os/input.h"
+#include "nvim/event/loop.h"
#define DICT_MAXNEST 100 /* maximum nesting of lists and dicts */
@@ -10966,7 +10966,7 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv)
if (!disable_job_defer++) {
// process any pending job events in the deferred queue, but only do this if
// deferred is not disabled(at the top-level `jobwait()` call)
- event_process();
+ loop_process_event(&loop);
}
// For each item in the input list append an integer to the output list. -3
// is used to represent an invalid job id, -2 is for a interrupted job and
@@ -11026,7 +11026,7 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv)
}
// poll to ensure any pending callbacks from the last job are invoked
- event_poll(0);
+ loop_poll_events(&loop, 0);
for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) {
Job *job = NULL;
@@ -20347,7 +20347,7 @@ static inline void push_job_event(Job *job, ufunc_T *callback,
event_data->data = job_data(job);
event_data->callback = callback;
event_data->type = type;
- event_push((Event) {
+ loop_push_event(&loop, (Event) {
.handler = on_job_event,
.data = event_data
}, !disable_job_defer);