Skip to content

Remove setFactory() side-effect and add resetDriver() #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

trowski
Copy link
Contributor

@trowski trowski commented Jan 30, 2017

Invoking Loop::setFactory() removes the active Driver instance as a side-effect. This PR removes this side-effect and requires a new DriverFactory instance be passed to Loop::setFactory() (instead of being nullable).

To remove the current Driver instance and force a new one to be created, a Loop::resetDriver() method is added. This method cannot be invoked while the loop is running.

@kelunik
Copy link
Member

kelunik commented Jan 31, 2017

Why did you remove the nullability?

@trowski
Copy link
Contributor Author

trowski commented Feb 21, 2017

@kelunik The nullability seemed pointless… why would you explicitly remove the factory without setting another?

@kelunik
Copy link
Member

kelunik commented Feb 21, 2017

Because tests or whatever.

@trowski
Copy link
Contributor Author

trowski commented Feb 21, 2017

Testing maybe… so I'll put it back.

@kelunik
Copy link
Member

kelunik commented Apr 17, 2017

Closing, as project discontinued for now.

@kelunik kelunik closed this Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants