public void Dispose()
        {
            while (_asyncReadQueue.TryDequeue(out var token))
            {
                try
                {
                    token.SetException(new Exception("Error: Disposing..."));
                }
                catch { }
            }
            while (_asyncWriteQueue.TryDequeue(out var token))
            {
                try
                {
                    token.SetException(new Exception("Error: Disposing..."));
                }
                catch { }
            }

            _asyncTransferPool.Dispose();
            _asyncConnectArgs.Dispose();
        }
예제 #2
0
 public void Dispose()
 {
     _asyncTransferPool.Dispose();
     _asyncConnectArgs.Dispose();
 }