[ 
https://issues.apache.org/jira/browse/MINIFI-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997273#comment-15997273
 ] 

ASF GitHub Bot commented on MINIFI-258:
---------------------------------------

Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/91#discussion_r114864639
  
    --- Diff: libminifi/include/EventDrivenSchedulingAgent.h ---
    @@ -38,8 +38,8 @@ class EventDrivenSchedulingAgent : public 
ThreadedSchedulingAgent {
       /*!
        * Create a new processor
        */
    -  EventDrivenSchedulingAgent(std::shared_ptr<core::Repository> repo)
    -      : ThreadedSchedulingAgent(repo) {
    +  EventDrivenSchedulingAgent(const std::shared_ptr<core::Repository> 
&repo, const std::shared_ptr<Configure> &configure)
    --- End diff --
    
    These schedulers stop in a way in which we don't guarantee threads to stop. 
We wait in flow controller 1s to stop threads, thus we can't be 100% certain 
that the scheduled threads have stopped. They "probably" did, but we likely 
want to keep this pass by value to ensure that we are guaranteed shared 
ownership of the shared repo. Since the threads are daemon threads, they will 
stop eventually, but we probably want to avoid the error of a dereferencing 
deleted memory if we can to aid in eventual recoverability ( if that's a thing 
).


> Avoid using singleton for Configure. 
> -------------------------------------
>
>                 Key: MINIFI-258
>                 URL: https://issues.apache.org/jira/browse/MINIFI-258
>             Project: Apache NiFi MiNiFi
>          Issue Type: Bug
>          Components: C++
>            Reporter: marco polo
>            Assignee: Bryan Rosander
>
> Avoiding a singleton for Configure will allow us to eventually support 
> multiple, disparate flows. The object FlowConfiguration can be passed with 
> the information in Configure. This has increased coupling dramatically while 
> also limiting how configurations can be stored within minifi. 
> It stands to reason that to eventually support C2 activities and to 
> facilitate multiple configurations, we will need to remove state from the 
> global level and make it something that is referenced from the objects which 
> care ( proper encapsulation ). 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to