コード例 #1
0
ファイル: Fragmentation.cs プロジェクト: weimingtom/miniclr
        public void Stop()
        {
            lock (_lock)
            {
                _started = false;
                if (_outboundAssociations != null)
                {
                    _outboundAssociations.Dispose();
                    _outboundAssociations = null;
                }

                if (_inboundAssociations != null)
                {
                    _inboundAssociations.Dispose();
                    _inboundAssociations = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueEvent.Set();
                    _dataRequestQueueEvent = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueSet.Dispose();
                    _dataRequestQueueSet = null;
                }

                if (_timer != null)
                {
                    _timer.Dispose();
                }
            }
        }