/// <summary> /// This method is used to execute a tracker on enqueue until there are task slots available. /// </summary> /// <param name="tracker">The tracker.</param> public void ExecuteOrEnqueue(TaskTracker tracker) { var payload = tracker.ToTransmissionPayload(); payload?.TraceConfigure(mPolicy.TransmissionPayloadTraceEnabled); if (tracker.IsInternal) { if (mPolicy.ExecuteInternalDirect) { ExecuteTask(tracker); } else { mProcessInternalQueue.Enqueue(tracker); payload?.TraceWrite("InternalQueue", "TaskManager"); } } else { mTasksQueue.Enqueue(tracker); payload?.TraceWrite("TaskQueue", "TaskManager"); } LoopSet(); }
/// <summary> /// This method is used to execute a tracker on enqueue until there are task slots available. /// </summary> /// <param name="tracker">The tracker.</param> public void ExecuteOrEnqueue(TaskTracker tracker) { //This is where the security validation should be added. if (tracker.IsInternal) { if (mPolicy.ExecuteInternalDirect) { ExecuteTask(tracker); } else { mProcessInternalQueue.Enqueue(tracker); } } else { mTasksQueue.Enqueue(tracker); } LoopSet(); }