Exemple #1
0
        DeviceAction InternalPost(Queue <DeviceAction> queue, DeviceAction action)
        {
            lock (this)
            {
                if (this.runningTask == null)
                {
                    StartNextTask(action);
                }
                else
                {
                    queue.Enqueue(action);
                }

                this.lastActivityUtc = DateTime.UtcNow;
            }

            return(action);
        }
Exemple #2
0
 public DeviceAction PriorityPost(DeviceAction action) => InternalPost(this.priorityTasks, action);
Exemple #3
0
 public DeviceAction Post(DeviceAction action) => InternalPost(this.tasks, action);