Ejemplo n.º 1
0
        public void StartCurrentTask()
        {
            try
            {
                m_wait     = new ManualResetEventSlim(false);
                m_shutdown = new ManualResetEventSlim(false);
                Q_local    = new FreeForm_LocalQueue <ICommsEntity>();

                Task t_item = FreeformTaskHelper.CreateAndExecuteTask(ExecuteLocalQueue, TaskCreationOptions.LongRunning);
                this.TaskID = t_item.Id;
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
        }
Ejemplo n.º 2
0
 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);
     }
 }