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

don't release the GIL #77

Merged
merged 1 commit into from
Mar 28, 2015
Merged

Conversation

esc
Copy link
Member

@esc esc commented Mar 27, 2015

No description provided.

@esc
Copy link
Member Author

esc commented Mar 27, 2015

@FrancescAlted seems too easy somehow.

@FrancescAlted
Copy link
Member

@ThomasWaldmann If what you are asking is why we are holding the GIL now is because the new c-blosc 1.5 series does not have a global lock anymore, so it is up to the application to provide it. In Python the cheapest way is to leverage the GIL so that it will prevent multithreaded Python apps to step on each other and corrupt c-blosc internal variables.

@FrancescAlted
Copy link
Member

Merging. With that, I think it is safe to include the recently released c-blosc 1.5.3. As you know, I would like to have this in (instead of 1.4 series) so as to get more feedback on whether the issues in bcolz and 1.5 series is a problem with c-blosc, bcolz or another reason (GCC, libc...).

FrancescAlted added a commit that referenced this pull request Mar 28, 2015
@FrancescAlted FrancescAlted merged commit 707aa31 into Blosc:master Mar 28, 2015
@ThomasWaldmann
Copy link

Ah, so it's basically similar as before, just done at another place.
It looked like you were not holding a lock before and would hold one after the changeset.

@FrancescAlted
Copy link
Member

Yes, holding the GIL is the intent.

@esc
Copy link
Member Author

esc commented Mar 28, 2015

Thanks for the merge, I'll get a PR ready for Blosc v1.5.3

@esc esc deleted the vh/feature/keep_gil branch March 28, 2015 12:18
@esc
Copy link
Member Author

esc commented Mar 28, 2015

@ThomasWaldmann we also recently had a discussion about this over at bcolz: Blosc/bcolz#166

@ThomasWaldmann
Copy link

I just wrote some multithreaded code for attic / borg backup. If blosc could work flawlessly without holding the GIL, I guess I would get some better parallelism (it does I/O [no GIL issue], hashing [?], compression [blosc->GIL, zlib->?], encryption [?]).

@esc
Copy link
Member Author

esc commented May 25, 2015

You can always try and see how it works for you. Older versions of Python-Blosc still had code that keept the GIL and worked well. you should check the changelog and find a version that included Blosc 1.4.x that was the last version that worked with releasing the GIL.

@ThomasWaldmann
Copy link

@esc ah, thanks for the hint!

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.

3 participants