robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
38986188ba
master
1#pragma once 2 3#include <stdbool.h> 4#include <uv.h> 5 6#include "klib/kvec.h" 7#include "nvim/event/defs.h" // IWYU pragma: keep 8#include "nvim/types_defs.h" // IWYU pragma: keep 9 10struct loop { 11uv_loop_t uv ; 12MultiQueue * events ; 13MultiQueue * thread_events ; 14// Immediate events. 15// - "Processed after exiting `uv_run()` (to avoid recursion), but before returning from 16// `loop_poll_events()`." 502aee690c98 17// - Practical consequence (for `main_loop`): 18// - these are processed by `state_enter()..input_get()` whereas "regular" events 19// (`main_loop.events`) are processed by `state_enter()..VimState.execute()` 20// - `state_enter()..input_get()` can be "too early" if you want the event to trigger UI 21// updates and other user-activity-related side-effects. 22MultiQueue * fast_events ; 23 24// used by process/job-control subsystem 25kvec_t (Proc * )children ; 26uv_signal_t children_watcher ; 27uv_timer_t children_kill_timer ; 28 29// generic timer, used by loop_poll_events() 30uv_timer_t poll_timer ; 31 32uv_timer_t exit_delay_timer ; 33 34uv_async_t async ; 35uv_mutex_t mutex ; 36int recursive ; 37bool closing ;///< Set to true if loop_close() has been called 38}; 39 40#include "event/loop.h.generated.h"