Skip to content
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

Using Dask Client as context manager #49

Open
Bronzila opened this issue Aug 2, 2023 · 0 comments
Open

Using Dask Client as context manager #49

Bronzila opened this issue Aug 2, 2023 · 0 comments
Labels
enhancement New feature or request refactoring Improving code quality

Comments

@Bronzila
Copy link
Collaborator

Bronzila commented Aug 2, 2023

As described by @eddiebergman in #45:

Relying on __del__ for for cleanup is usually a bad practice and can lead to problems if DEHB would be the last thing to be cleaned up.
The correct way, is that Dask Clients can be used as context managers and is likely what you want to have around your hot loop. In the case of a user supplied dask, not sure what you want, might be bad form to automatically shut down their client unless they've specified it somehow.

Before implementing this, we should definitely discuss how we should handle the situation where the user supplies their client. I would agree with Eddie, that simply shutting it down might be bad form.

@Bronzila Bronzila added enhancement New feature or request refactoring Improving code quality labels Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Improving code quality
Projects
None yet
Development

No branches or pull requests

1 participant