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