public void AsyncCanBeSent()
        {
            var loop = new UvLoopHandle(_logger);

            loop.Init(_uv);
            var trigger = new UvAsyncHandle(_logger);
            var called  = false;

            trigger.Init(loop, () =>
            {
                called = true;
                trigger.Dispose();
            }, (a, b) => { });
            trigger.Send();
            loop.Run();
            loop.Dispose();
            Assert.True(called);
        }
Ejemplo n.º 2
0
        public void Stop()
        {
            _shutdownPostHandle.Send();

            _thread.Join();
        }
Ejemplo n.º 3
0
        public void Disconnect()
        {
            _shutdownPostHandle.Send();

            _thread.Join();
        }