hunyadi-dev commented on pull request #890:
URL: https://github.com/apache/nifi-minifi-cpp/pull/890#issuecomment-688432366


   > Since the requirement of "one has to call load before start" is not 
documented anywhere, I would restore the `initialized_` variable to prevent 
invalid usage of `FlowController`.
   > I fell into this trap of only calling `stop`/`start` instead of 
`stop`,`unload`/`load`,`start` while working on #875
   
   I see what you mean, but I disagree. I would definitely avoid adding states 
like this to an object. I found it already quite a task to decipher in what 
state can we reach each of the member functions. How about either of these 
options:
    1. I can make the FlowController a state machine with well defined 
transitions between states
    1. I can add checks to the `start` method that ensure that the members set 
in `load` are indeed set.


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