hunyadi-dev commented on a change in pull request #992:
URL: https://github.com/apache/nifi-minifi-cpp/pull/992#discussion_r579209742



##########
File path: libminifi/src/Connection.cpp
##########
@@ -224,11 +216,11 @@ std::shared_ptr<core::FlowFile> 
Connection::poll(std::set<std::shared_ptr<core::
 }
 
 void Connection::drain(bool delete_permanently) {
-  std::lock_guard<std::mutex> lock(mutex_);
+  auto lockedQueue = queue_.lock();

Review comment:
       A better pattern would be just to lock the queue until you move the data 
out of it.




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