mirror of
https://github.com/python/cpython.git
synced 2024-11-24 00:38:00 +01:00
31c90d5838
Critical sections are helpers to replace the global interpreter lock with finer grained locking. They provide similar guarantees to the GIL and avoid the deadlock risk that plain locking involves. Critical sections are implicitly ended whenever the GIL would be released. They are resumed when the GIL would be acquired. Nested critical sections behave as if the sections were interleaved. |
||
---|---|---|
.. | ||
clinic | ||
parts.h | ||
pytime.c | ||
README.txt | ||
set.c | ||
test_critical_sections.c | ||
test_lock.c |
Tests in this directory are compiled into the _testinternalcapi extension. The main file for the extension is Modules/_testinternalcapimodule.c, which calls `_PyTestInternalCapi_Init_*` from these functions. See Modules/_testcapi/README.txt for guideline when writing C test code.