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
Patch to make zlib-objects better support threads #48988
Comments
My application needs to pack and unpack workunits all day long and does The patch (svn diff to ) attached here fixes this problem by extending |
A call to PyThread_free_lock(this->lock) in Comp_dealloc() and |
new svn diff |
Ok, the patch looks fine and I like finer locks ;-) |
New comments about the last patch:
Are deflateCopy() and inflateCopy() slow enough to release the GIL? |
new svn diff attached
|
Comments on zlib_threads-2.diff:
|
new svn diff attached the indentation in this file is not my fault, it has tabs all over it... The 5kb limits protects from the overhead of releasing the GIL. With May I also suggest to change the zlib module not to accept s* but y*:
|
You are probably right, but this would also break the API and can't be |
I opened a separate issue for the unicode problem: bpo-4757. |
Same comment about potential deadlocks as in bpo-4751. |
Here is a small test-script with concurrent access to a single The patch attached releases the GIL before trying to get the zlib-lock. |
test-script |
Checked in r68165. Thanks! |
@pitrou: You added "Also, the GIL is now released when computing the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: