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

Released the GIL #8

Merged
merged 1 commit into from
Jun 14, 2019
Merged

Released the GIL #8

merged 1 commit into from
Jun 14, 2019

Conversation

YoilyL
Copy link
Contributor

@YoilyL YoilyL commented Jun 13, 2019

released the GIL to make use of multiple cores when using multithreading.

as per the docs:

Calling system I/O functions is the most common use case for releasing the GIL, but it can also be useful before calling long-running computations which don’t need access to Python objects, such as compression or cryptographic functions operating over memory buffers. For example, the standard zlib and hashlib modules release the GIL when compressing or hashing data.

# New Document
released the GIL to make use of multiple cores when using multithreading.

as per [the docs](https://docs.python.org/3/c-api/init.html#releasing-the-gil-from-extension-code):
>Calling system I/O functions is the most common use case for releasing the GIL, but it can also be useful before calling long-running computations which don’t need access to Python objects, such as compression or **cryptographic functions operating over memory buffers**. For example, the standard zlib and hashlib modules release the GIL when compressing or hashing data.
@delivrance delivrance merged commit aabb77d into pyrogram:tests Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants