示例#1
0
        private void QueueReader()
        {
            isActive = true;
            while (running)
            {
                IQueueMessage msg = inputQueue.Dequeue() as IQueueMessage;
                try
                {
                    if (msg == null)
                    {
                        continue;
                    }

                    msg.Run();
                }
                catch (ThreadInterruptedException)
                {
                }
                catch (Exception e)
                {
                    CachingServiceInternalFailureEvent.Fire(SR.BackgroundSchedulerProducerConsumerQueueFailure, e);
                }
                catch
                {
                    CachingServiceInternalFailureEvent.Fire(SR.BackgroundSchedulerProducerConsumerQueueFailure, new Exception(SR.UnknownFailureReason));
                }
            }
            isActive = false;
        }
        private void QueueReader()
        {
            isActive = true;
            while (running)
            {
                IQueueMessage msg = inputQueue.Dequeue() as IQueueMessage;
                try
                {
                    if (msg == null)
                    {
                        continue;
                    }

                    msg.Run();
                }
                catch (ThreadInterruptedException)
                {
                }
                catch (Exception e)
                {
                    instrumentationProvider.FireCacheFailed(Resources.BackgroundSchedulerProducerConsumerQueueFailure, e);
                }
            }
            isActive = false;
        }