CK.Monitoring.Impl.EventDispatcher.EventDispatcher C# (CSharp) Method

EventDispatcher() public method

public EventDispatcher ( IGrandOutputDispatcherStrategy strategy, Action onIdle = null ) : CK.Core
strategy IGrandOutputDispatcherStrategy
onIdle Action
return CK.Core
        public EventDispatcher( IGrandOutputDispatcherStrategy strategy, Action<TimeSpan> onIdle = null )
        {
            Debug.Assert( strategy != null );
            _queue = new ConcurrentQueue<EventItem>();
            _dispatchLock = new object();
            _strat = strategy;
            _onIdle = onIdle;
            _overloadLock = new object();
            _thread = new Thread( Run );
            _thread.IsBackground = true;
            _strat.Initialize( () => _nonBlockingCount, _thread, out _idleManager );
            _thread.Start();
        }