hunyadi-dev commented on a change in pull request #890:
URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484516482



##########
File path: libminifi/src/FlowController.cpp
##########
@@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() {
   conditionalReloadScheduler<CronDrivenSchedulingAgent>(cron_scheduler_, 
!cron_scheduler_);
 }
 
-void FlowController::reinitializeSchedulersWithNewThreadPool() {
-  using ControllerServiceProvider = 
core::controller::ControllerServiceProvider;
+void FlowController::reinitializeSchedulersWithClearedThreadPool() {
+  using NonNullControllerServiceProviderPtr = 
gsl::not_null<core::controller::ControllerServiceProvider*>;
   restartThreadPool();
-  timer_scheduler_ = 
std::make_shared<TimerDrivenSchedulingAgent>(gsl::not_null<ControllerServiceProvider*>(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);
-  event_scheduler_ = 
std::make_shared<EventDrivenSchedulingAgent>(gsl::not_null<ControllerServiceProvider*>(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);
-  cron_scheduler_ = 
std::make_shared<CronDrivenSchedulingAgent>(gsl::not_null<ControllerServiceProvider*>(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);
+  timer_scheduler_ = 
std::make_shared<TimerDrivenSchedulingAgent>(NonNullControllerServiceProviderPtr(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);
+  event_scheduler_ = 
std::make_shared<EventDrivenSchedulingAgent>(NonNullControllerServiceProviderPtr(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);
+  cron_scheduler_ = 
std::make_shared<CronDrivenSchedulingAgent>(NonNullControllerServiceProviderPtr(this),
 provenance_repo_, flow_file_repo_, content_repo_, configuration_, 
thread_pool_);

Review comment:
       This is an explicit conversion.




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


Reply via email to