示例#1
0
 public void Dispose()
 {
     Entry.Dispose();
     _AgentUpdater.Stop();
     _Service.Leave(_Agent);
     _Service.Dispose();
 }
示例#2
0
 void IDisposable.Dispose()
 {
     _ThreadUpdater.Stop();
     _Updater.Shutdown();
     lock (_Users)
     {
         _Users.Clear();
     }
 }
示例#3
0
        public void Shutdown()
        {
            _Reader.DoneEvent -= _RequestPush;
            _Reader.Stop();

            _Writer.Stop();

            System.Threading.Interlocked.Add(ref _TotalResponse, -_Responses.Count);
            System.Threading.Interlocked.Add(ref _TotalRequest, -_Requests.Count);


            _Updater.Stop();

            SendBreakEvent();
        }
示例#4
0
        void _Shutdown()
        {
            _Reader.DoneEvent -= _RequestPush;
            _Reader.Stop();

            _Writer.Stop();

            _Updater.Stop();
            RequestPackage req;

            while (_ExternalRequests.TryDequeue(out req))
            {
            }

            System.Threading.Interlocked.Add(ref _TotalResponse, -_Responses.Count);
            System.Threading.Interlocked.Add(ref _TotalRequest, -_Requests.Count);

            _SendBreakEvent();
            _Enable = false;
        }
 void IDisposable.Dispose()
 {
     _Updater.Stop();
     _Users.Shutdown();
 }