diff --git a/.version b/.version index 1464c52..ece61c6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.0.5 \ No newline at end of file +1.0.6 \ No newline at end of file diff --git a/Arrowgene.Networking/Tcp/Consumer/BlockingQueueConsumption/ThreadedBlockingQueueConsumer.cs b/Arrowgene.Networking/Tcp/Consumer/BlockingQueueConsumption/ThreadedBlockingQueueConsumer.cs index 35ace1f..4b590a3 100644 --- a/Arrowgene.Networking/Tcp/Consumer/BlockingQueueConsumption/ThreadedBlockingQueueConsumer.cs +++ b/Arrowgene.Networking/Tcp/Consumer/BlockingQueueConsumption/ThreadedBlockingQueueConsumer.cs @@ -51,6 +51,7 @@ private void Consume(int unitOfOrder) Logger.Exception(ex); Stop(); } + return; } @@ -69,7 +70,7 @@ private void Consume(int unitOfOrder) } } - void IConsumer.OnStart() + public virtual void OnStart() { if (_isRunning) { @@ -90,7 +91,7 @@ void IConsumer.OnStart() } } - void IConsumer.OnStarted() + public virtual void OnStarted() { } @@ -114,7 +115,7 @@ void IConsumer.OnStop() Stop(); } - void IConsumer.OnStopped() + public virtual void OnStopped() { } @@ -137,5 +138,16 @@ private void Stop() _threads[i] = null; } } + + public void LogStatus() + { + Logger.Info($"[{_identity}] _isRunning :{_isRunning}"); + for (int i = 0; i < _maxUnitOfOrder; i++) + { + Logger.Info($"[{_identity}] _threads[{i}].IsAlive:{_threads[i].IsAlive}"); + Logger.Info($"[{_identity}] _threads[{i}].ThreadState:{_threads[i].ThreadState}"); + Logger.Info($"[{_identity}] _queues[{i}].Count :{_queues[i].Count}"); + } + } } } \ No newline at end of file