adamdebreceni commented on a change in pull request #920:
URL: https://github.com/apache/nifi-minifi-cpp/pull/920#discussion_r508460189
##########
File path: libminifi/include/utils/ThreadPool.h
##########
@@ -227,11 +227,10 @@ class ThreadPool {
* Returns true if a task is running.
*/
bool isTaskRunning(const std::string &identifier) const {
- try {
- return task_status_.at(identifier) == true;
- } catch (const std::out_of_range &) {
+ const auto iter = task_status_.find(identifier);
Review comment:
I know it's old code but I wonder why aren't we locking the
`worker_queue_mutex_` or the `manager_mutex_` mutex here, even though we lock
at least one of them every other place we access the `task_status_` map
----------------------------------------------------------------
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]