adamdebreceni commented on a change in pull request #974: URL: https://github.com/apache/nifi-minifi-cpp/pull/974#discussion_r555586163
########## File path: libminifi/include/utils/ThreadPool.h ########## @@ -344,11 +364,13 @@ class ThreadPool { // notification for new delayed tasks that's before the current ones std::condition_variable delayed_task_available_; // map to identify if a task should be - std::map<TaskId, bool> task_status_; + std::map<TaskId, TaskState> task_status_; // manager mutex std::recursive_mutex manager_mutex_; // thread pool name std::string name_; + // map of paused tasks moved from worker queue that should not run at the time + std::map<TaskId, Worker<T>> paused_tasks_; Review comment: there could be multiple tasks with the same `TaskId` when the maxConcurrentTasks is greater than 1, this way we could discard tasks on a pause + resume ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org