private void ExecuteLocalQueue()
 {
     try
     {
         while (!m_shutdown.Wait(1000))
         {
             m_wait.Wait();
             if (m_shutdown.IsSet)
             {
                 break;                   // shutdown called
             }
             if (Q_local.Count > 0)
             {
                 ICommsEntity p_msg = null;
                 Q_local.TryDequeue(out p_msg);
                 this.ProcessQueueItem(p_msg);
                 Interlocked.Decrement(ref _localQcount);
                 QueueProcessed(new TaskItemEventArgs()
                 {
                     TaskID    = this.TaskID,
                     Q_Count   = _localQcount,
                     FFMessage = p_msg,
                 });
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
 public void AddDataItem(ICommsEntity Msg)
 {
     try
     {
         if (Q_local == null)
             Q_local = new FreeForm_LocalQueue<ICommsEntity>();
         Q_local.Enqueue(Msg);
         Interlocked.Increment(ref _localQcount);
         m_wait.Set();
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
 public void AddDataItem(ICommsEntity Msg)
 {
     try
     {
         if (Q_local == null)
         {
             Q_local = new FreeForm_LocalQueue <ICommsEntity>();
         }
         Q_local.Enqueue(Msg);
         Interlocked.Increment(ref _localQcount);
         m_wait.Set();
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
Beispiel #4
0
 void H2GQueue_ProcessQueueItem(ICommsEntity queueItem)
 {
     //_handler.ProcessMessage(queueItem as FFMsg_H2G);
     //ExecutionStepFactory.Current.Execute(queueItem as FFMsg_H2G);
     FFMsgHandlerFactory.Current.Execute(queueItem as FFMsg_H2G);
 }