/// <summary> /// 监视器全部卸载后 loop 结束阻塞 /// </summary> /// <param name="obj"></param> private void AllHandleDisPose(object obj) { if (_listenHandle != null && !_listenHandle.IsClosed && !_listenHandle.IsInvalid) { //关闭Tcp监视器 _listenHandle.Dispose(); _listenHandle = null; } if (_uvPipeHandle != null && !_uvPipeHandle.IsClosed && !_uvPipeHandle.IsInvalid) { //关闭Pipe管道监视器 _uvPipeHandle.Dispose(); _uvPipeHandle = null; } foreach (UvPipeHandle current in _pipeHandleList) { if (current != null && !current.IsClosed && !current.IsInvalid) { current.Dispose(); } } //关闭异步监视器 _asyncHand1.UvUnRef(); _asyncHand2.UvUnRef(); }
private void AllHandleDisPose(object obj) { if (_uvPipeHandle != null && !_uvPipeHandle.IsInvalid && !_uvPipeHandle.IsClosed) { _uvPipeHandle.Dispose(); _uvPipeHandle = null; } _asyncHand1.UvUnRef(); _asyncHand2.UvUnRef(); }