Example #1
0
        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();
        }
Example #2
0
 public extern static int uv_async_send(UvAsyncHandle handle);
Example #3
0
 public static extern int uv_async_init(UvLoopHandle loop,UvAsyncHandle handle,uv_async_cb cb);
Example #4
0
 public void async_send(UvAsyncHandle handle)
 {
     ThrowIfErrored(_uv_async_send(handle));
 }
Example #5
0
 public void async_init(UvLoopHandle loop, UvAsyncHandle handle, uv_async_cb cb)
 {
     loop.Validate();
     handle.Validate();
     ThrowIfErrored(_uv_async_init(loop, handle, cb));
 }