lordgamez commented on a change in pull request #865:
URL: https://github.com/apache/nifi-minifi-cpp/pull/865#discussion_r468525284



##########
File path: libminifi/src/core/ProcessGroup.cpp
##########
@@ -263,26 +263,21 @@ void ProcessGroup::stopProcessing(const 
std::shared_ptr<TimerDrivenSchedulingAge
   }
 }
 
-std::shared_ptr<Processor> ProcessGroup::findProcessor(utils::Identifier 
&uuid) {
-  std::lock_guard<std::recursive_mutex> lock(mutex_);
-  std::shared_ptr<Processor> ret = NULL;
-  for (auto processor : processors_) {
-    logger_->log_debug("find processor %s", processor->getName());
+std::shared_ptr<Processor> ProcessGroup::findProcessorById(const 
utils::Identifier& uuid) const {
+  const auto id_matches = [&] (const std::shared_ptr<Processor>& processor) {

Review comment:
       It might be safer to only capture uuid by reference if this changes in 
the future




----------------------------------------------------------------
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]


Reply via email to