loop.c File Reference
#include <stdarg.h>
#include <stdint.h>
#include <uv.h>
#include "nvim/event/loop.h"
#include "nvim/event/process.h"
#include "nvim/log.h"


void loop_init (Loop *loop, void *data)
bool loop_poll_events (Loop *loop, int ms)
void loop_schedule_fast (Loop *loop, Event event)
void loop_schedule_deferred (Loop *loop, Event event)
void loop_on_put (MultiQueue *queue, void *data)
bool loop_close (Loop *loop, bool wait)
void loop_purge (Loop *loop)
size_t loop_size (Loop *loop)

Function Documentation

bool loop_close ( Loop loop,
bool  wait 
false if the loop could not be closed gracefully
void loop_init ( Loop loop,
void data 
void loop_on_put ( MultiQueue queue,
void data 
bool loop_poll_events ( Loop loop,
int  ms 

Processes one Loop.uv event (at most). Processes all Loop.fast_events events. Does NOT process, that is an application-specific decision.

ms0: non-blocking poll. >0: timeout after ms. <0: wait forever.
true if ms timeout was reached
void loop_purge ( Loop loop)
void loop_schedule_deferred ( Loop loop,
Event  event 

Schedules an event from another thread. Unlike loop_schedule_fast(), the event is forwarded to, instead of being processed immediately.

See also
void loop_schedule_fast ( Loop loop,
Event  event 

Schedules a fast event from another thread.

Event is queued into fast_events, which is processed outside of the primary events queue by loop_poll_events(). For main_loop, that means fast_events is NOT processed in an "editor mode" (VimState.execute), so redraw and other side-effects are likely to be skipped.
See also
size_t loop_size ( Loop loop)