You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/06/16 13:24:43 UTC

[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #812: MINIFICPP-1247 - Enhance logging for CWEL

arpadboda commented on a change in pull request #812:
URL: https://github.com/apache/nifi-minifi-cpp/pull/812#discussion_r440845810



##########
File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
##########
@@ -173,6 +173,15 @@ ConsumeWindowsEventLog::ConsumeWindowsEventLog(const std::string& name, utils::I
   writePlainText_ = false;
 }
 
+void ConsumeWindowsEventLog::notifyStop() {
+  logger_->log_trace("start notifyStop"); 
+  pBookmark_.reset();
+  if (hMsobjsDll_) {
+    FreeLibrary(hMsobjsDll_);

Review comment:
       I think we should grab the mutex here. 
   
   A long-running onTrigger execution can still be running when notifyStop is called from a different thread.
   
   So we might unload the library while it's in use. 
   
   To avoid this, let's lock onTriggerMutex_




----------------------------------------------------------------
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:
users@infra.apache.org