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_r385276946
 
 

 ##########
 File path: libminifi/include/SchedulingAgent.h
 ##########
 @@ -202,7 +134,7 @@ class SchedulingAgent {
 
   std::shared_ptr<core::ContentRepository> content_repo_;
   // thread pool for components.
-  utils::ThreadPool<uint64_t> thread_pool_;
+  utils::ThreadPool<utils::TaskRescheduleInfo> &thread_pool_;
 
 Review comment:
   I know that I'm at fault for suggesting this, but I was dump and didn't know 
that "a reference member is almost always wrong". Suggestion: change to raw 
pointer (i.e. observer semantics, similarly to a reference) with not_null 
annotation (`gsl::not_null<T*>` or a comment and prayer).
   
   See last sentence of "Exceptions": 
http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#define-copy-move-and-destroy-consistently

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