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

 ##########
 File path: libminifi/include/utils/ThreadPool.h
 ##########
 @@ -384,9 +358,11 @@ class ThreadPool {
   moodycamel::ConcurrentQueue<std::shared_ptr<WorkerThread>> 
deceased_thread_queue_;
 // worker queue of worker objects
   moodycamel::ConcurrentQueue<Worker<T>> worker_queue_;
-  std::priority_queue<Worker<T>, std::vector<Worker<T>>, WorkerComparator<T>> 
worker_priority_queue_;
+  std::priority_queue<Worker<T>, std::vector<Worker<T>>, 
DelayedTaskComparator<T>> delayed_worker_queue_;
 
 Review comment:
   I'd consider marking `Worker<T>`'s move ctor and move assignment operator as 
`noexcept`. I have bad feelings about relying on the vector exception for 
move-only not-nothrow-movable types, especially since all exception guarantees 
are waived.
   The only non-static data member in Worker that could in theory throw on move 
is `std::string` and it will not throw in practice with the default allocator.

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