internal static int RunLoop(IntPtr handle, uv_run_mode mode) { if (handle != IntPtr.Zero) { /* * UV_RUN_DEFAULT: * Runs the event loop until there are no more active and referenced handles or requests. * Returns non-zero if uv_stop() was called and there are still active handles or requests. * Returns zero in all other cases. * * UV_RUN_ONCE: * Poll for i/o once. Note that this function blocks if there are no pending callbacks. * Returns zero when done (no active handles or requests left), * or non-zero if more callbacks are expected(meaning you should run the event loop again sometime in the future). * * UV_RUN_NOWAIT: * Poll for i/o once but don’t block if there are no pending callbacks. * Returns zero if done(no active handles or requests left), * or non-zero if more callbacks are expected(meaning you should run the event loop again sometime in the future). */ return(uv_run(handle, mode)); } else { throw new ArgumentException("Handle can't be null!"); } }
internal static int RunLoop(IntPtr handle, uv_run_mode mode) { if (handle == IntPtr.Zero) { throw new ArgumentException("Empty handle value is not valid."); } /* * UV_RUN_DEFAULT: * Runs the event loop until there are no more active and referenced handles or requests. * Returns non-zero if uv_stop() was called and there are still active handles or requests. * Returns zero in all other cases. * * UV_RUN_ONCE: * Poll for i/o once. Note that this function blocks if there are no pending callbacks. * Returns zero when done (no active handles or requests left), * or non-zero if more callbacks are expected(meaning you should run the event loop again sometime in the future). * * UV_RUN_NOWAIT: * Poll for i/o once but don’t block if there are no pending callbacks. * Returns zero if done(no active handles or requests left), * or non-zero if more callbacks are expected(meaning you should run the event loop again sometime in the future). */ int result = InvokeFunction(uv_run, handle, mode); Log.Debug($"Native run loop {handle} {mode}, result = {result}"); return(result); }
public int Run(uv_run_mode mode) { Validate(); uv_run_inprogress = true; int result = NativeMethods.RunLoop(Handle, mode); uv_run_inprogress = false; return(result); }
static extern void uv_run(IntPtr loop, uv_run_mode mode);
public int Run(uv_run_mode mode) { Validate(); return(NativeMethods.uv_run(_handle, mode)); }
internal int Run(uv_run_mode mode) { this.Validate(); return(NativeMethods.RunLoop(this.Handle, mode)); }
internal static extern int uv_run(IntPtr loop, uv_run_mode uv_run_mode);
static extern int uv_run(IntPtr handle, uv_run_mode mode);
internal static extern int uv_run(IntPtr loop, uv_run_mode uv_run_mode); // uv_loop_t*
public static extern int uv_run(IntPtr loop, uv_run_mode mode);
public int Run(uv_run_mode mode) { this.Validate(); return NativeMethods.uv_run(this.handle, mode); }