Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/37#discussion_r98902210
--- Diff: libminifi/src/Processor.cpp ---
@@ -206,6 +207,29 @@ bool Processor::getProperty(std::string name,
std::string &value)
}
}
+bool Processor::getDynamicProperty(std::string name, std::string &value)
+{
+ if (isRunning())
+ // Because set property only allowed in non running state, we
need to obtain lock avoid rack condition
+ _mtx.lock();
--- End diff --
Hi, any particular reason you did not use a lock guard ?
http://en.cppreference.com/w/cpp/thread/lock_guard
It's scoped on the stack pop so you don't need to unlock.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---