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

Method to close links to underlying dataset reader #50

Closed
atedstone opened this issue Nov 20, 2020 · 0 comments · Fixed by #265
Closed

Method to close links to underlying dataset reader #50

atedstone opened this issue Nov 20, 2020 · 0 comments · Fixed by #265
Labels
bug Something isn't working enhancement Feature improvement or request

Comments

@atedstone
Copy link
Member

By default, there are at least two links to the underlying rasterio reader saved within a Raster object: .ds, .dataset_mask . .memfile may also count.

There are some edge cases when this is problem. The one I've identified is that Rasters with these readers still open cannot be pickled when they are being distributed to compute nodes in multiprocessing situations.

Manually calling a method to close these links once the Raster has been created is a possible solution to this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Feature improvement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant