disable-gc-0.1.0
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | disable-gc-0.1.0 |
| نام | disable-gc |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/disable-gc/ |
| مجوز | - |
disable\_gc
===========
Python context manager for temporarily disabling the garbage collector.
Reentrant, threadsafe, safe for use in asyncio, and prevents GC
starvation.
Safe for use inside finalizers.
Usage
=====
::
from disable_gc import disable_gc
with disable_gc:
a = 1 # Doing things with GC disabled
@disable_gc
def func():
a = 1 # GC disabled inside the function.
Notes
=====
``disable_gc`` does not and cannot monkey patch ``gc.enable()``. Other
threads enabling the gc in the background will leave it enabled until
``disable_gc`` is reentered once again.
Can be used as a reference for
`bpo-31356 <https://bugs.python.org/issue31356>`__.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl disable-gc-0.1.0:
pip install disable-gc-0.1.0.whl
نصب پکیج tar.gz disable-gc-0.1.0:
pip install disable-gc-0.1.0.tar.gz