Functions
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"

Functions

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)
 
void loop_dummy_event (void **argv)
 

Function Documentation

bool loop_close ( Loop loop,
bool  wait 
)
Returns
false if the loop could not be closed gracefully
void loop_dummy_event ( void **  argv)
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 Loop.events, that is an application-specific decision.

Parameters
loop
ms0: non-blocking poll. >0: timeout after ms. <0: wait forever.
Returns
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 Loop.events, instead of being processed immediately.

See also
loop_schedule_fast
void loop_schedule_fast ( Loop loop,
Event  event 
)

Schedules a fast event from another thread.

Note
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
loop_schedule_deferred
size_t loop_size ( Loop loop)