Example #1
0
        internal AmEvtBase Dequeue()
        {
            AmEvtBase result = null;

            lock (this.m_locker)
            {
                if (this.m_highPriorityQueue.Count > 0)
                {
                    result = this.m_highPriorityQueue.Dequeue();
                }
                else if (this.m_queue.Count > 0)
                {
                    result = this.m_queue.Dequeue();
                }
            }
            return(result);
        }
Example #2
0
        internal bool Enqueue(AmEvtBase evt, bool isHighPriority)
        {
            if (!this.IsEnabled)
            {
                return(false);
            }
            bool result;

            lock (this.m_locker)
            {
                if (isHighPriority)
                {
                    this.m_highPriorityQueue.Enqueue(evt);
                }
                else
                {
                    this.m_queue.Enqueue(evt);
                }
                this.ArrivalEvent.Set();
                result = true;
            }
            return(result);
        }
Example #3
0
        // Token: 0x060004F5 RID: 1269 RVA: 0x0001A7C4 File Offset: 0x000189C4
        internal bool EnqueueDeferredSystemEvent(AmEvtBase evt, int after)
        {
            bool result;

            lock (this.m_locker)
            {
                if (this.m_isInUse || this.IsExiting)
                {
                    result = false;
                }
                else
                {
                    this.m_isInUse = true;
                    if (this.m_deferredTimer == null)
                    {
                        this.m_deferredTimer = new Timer(new TimerCallback(this.DeferredActionCallback), null, -1, -1);
                    }
                    this.m_deferredEvt = evt;
                    this.m_deferredTimer.Change(after, -1);
                    result = true;
                }
            }
            return(result);
        }
Example #4
0
 // Token: 0x060004F3 RID: 1267 RVA: 0x0001A6D4 File Offset: 0x000188D4
 internal static bool IsPeriodicEvent(AmEvtBase evt)
 {
     return(evt is AmEvtPeriodicDbStateAnalyze || evt is AmEvtPeriodicCheckMismountedDatabase);
 }