szaszm commented on a change in pull request #735: MINIFICPP-1158 - Event 
driven processors can starve each other
URL: https://github.com/apache/nifi-minifi-cpp/pull/735#discussion_r385284429
 
 

 ##########
 File path: libminifi/include/utils/ThreadPool.h
 ##########
 @@ -268,8 +238,16 @@ class ThreadPool {
   /**
    * Returns true if a task is running.
    */
-  bool isRunning(const std::string &identifier) {
-    return task_status_[identifier] == true;
+  bool isTaskRunning(const std::string &identifier) const {
+    try {
+      return task_status_.at(identifier) == true;
+    } catch (const std::out_of_range &e) {
+      return false;
+    }
+  }
 
 Review comment:
   I love the `const`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to