public UvThread(ILibuvTrace log) { _log = log; _loop = new UvLoopHandle(_log); _post = new UvAsyncHandle(_log); _thread = new Thread(ThreadStart); _thread.Name = "Libuv event loop"; _threadTcs = new TaskCompletionSource <object>(); QueueCloseHandle = PostCloseHandle; QueueCloseAsyncHandle = EnqueueCloseHandle; WriteReqPool = new WriteReqPool(this, _log); MemoryPool = KestrelMemoryPool.Create(); }
public extern static int uv_async_send(UvAsyncHandle handle);
public static extern int uv_async_init(UvLoopHandle loop,UvAsyncHandle handle,uv_async_cb cb);
public void async_send(UvAsyncHandle handle) { ThrowIfErrored(_uv_async_send(handle)); }
public void async_init(UvLoopHandle loop, UvAsyncHandle handle, uv_async_cb cb) { loop.Validate(); handle.Validate(); ThrowIfErrored(_uv_async_init(loop, handle, cb)); }