dam4rus commented on a change in pull request #992:
URL: https://github.com/apache/nifi-minifi-cpp/pull/992#discussion_r579215333
##########
File path: libminifi/include/utils/MinifiConcurrentQueue.h
##########
@@ -87,6 +91,10 @@ class ConcurrentQueue {
queue_.emplace_back(std::forward<Args>(args)...);
}
+ LockedConcurrentQueue<T> lock() {
Review comment:
Because `LockedConcurrentQueue` **is not a** `ConcurrentQueue`. It's
just a utility class that holds a lock to a `ConcurrentQueue`'s mutex and
provides access to the underlying queue until it goes out of scope. So instead
of locking the mutex with every operation you can do multiple operations with a
single locking. I'm open to a better name for the class.
----------------------------------------------------------------
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]