Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public DeviceAction PriorityPost(DeviceAction action) => InternalPost(this.priorityTasks, action);
Ejemplo n.º 3
0
 public DeviceAction Post(DeviceAction action) => InternalPost(this.tasks, action);