Ejemplo n.º 1
0
 public void RunTask(ScheduleSetting task)
 {
     if (task == null)
     {
         return;
     }
     _workerThreads.SingleOrDefault(c => c.Name == task.ThreadName)?.ScheduleExecute(task);
 }
Ejemplo n.º 2
0
 public void ScheduleExecute(ScheduleSetting poll)
 {
     if (poll == null)
     {
         return;
     }
     lock (lockObj)
     {
         if (_queue.Any(c => c.Name == poll.Name))
         {
             return;
         }
         _queue.Add(poll);
     }
     _autoReset.Set();
 }
Ejemplo n.º 3
0
 protected BaseWorker(ScheduleSetting settings)
 {
     Settings = settings;
 }