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

 ##########
 File path: libminifi/src/core/Processor.cpp
 ##########
 @@ -268,6 +268,7 @@ void Processor::onTrigger(const 
std::shared_ptr<ProcessContext> &context, const
 
 bool Processor::isWorkAvailable() {
   // We have work if any incoming connection has work
+  std::lock_guard<std::mutex> lock(mutex_);
 
 Review comment:
   Accessing incoming connections
   Not sure it's needed, but won't hurt, it's done the same way in 
"flowFilesQueued()" and "flowFileOutGoingFull()" above in this file, also the 
functions adding/removing connections lock this mutex as well. 
   

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