pyrogram / tgcrypto

Fast and Portable Cryptography Extension Library for Pyrogram
https://pyrogram.org
GNU Lesser General Public License v3.0
175 stars 41 forks source link

Released the GIL #8

Closed YoilyL closed 5 years ago

YoilyL commented 5 years ago

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.