Esempio n. 1
0
        protected void PutWorkerThreadEvent(WorkerEvent workerEvent)
        {
            try
            {
                _lockWe.Wait();

                if (!workerEvent.IsCollapsible ||
                    _workerEventList.Find(we => we.CompareTo(workerEvent) == 0) == null)
                {
                    if (_workerEventList.Count > WorkerEventSize)
                    {
                        _workerEventList.RemoveAt(0);
                    }
                    _workerEventList.Add(workerEvent);
                }
            }
            finally
            {
                _lockWe.Release();
            }
            WakeupWorkerThread();
        }
Esempio n. 2
0
 protected virtual bool DispatchThreadEvents(WorkerEvent workerEvent)
 {
     return(false);
 }