Skip to content

Detect main thread and adapt Blosc usage automatically #27

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
alimanfoo opened this issue May 6, 2016 · 0 comments
Closed

Detect main thread and adapt Blosc usage automatically #27

alimanfoo opened this issue May 6, 2016 · 0 comments

Comments

@alimanfoo
Copy link
Member

Currently if you switch between using Zarr in the main thread (e.g., making Zarr API calls directly in an IPython session) and using from multi-threaded context (e.g., if you use a Zarr array as part of a Dask computation), you have to manually switch the way Blosc is used by calling zarr.blosc.use_context(True) and zarr.blosc.use_context(False). This is cumbersome for interactive analysis. This could be avoided if the Blosc extension checked if the current thread is the main thread, and if so use Blosc in non-contextual mode, otherwise use Blosc in contextual mode, so the user doesn't have to do any manual switching.

alimanfoo added a commit that referenced this issue May 17, 2016
Refactoring for v1.0. Resolves #27, #25, #21, #7.
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

No branches or pull requests

1 participant