mirror of
https://github.com/python/cpython
synced 2026-09-28 02:33:18 +03:00
gh-111569: Implement Python critical section API (gh-111571)
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.
This commit is contained in:
parent
0b718e6407
commit
31c90d5838
19 changed files with 630 additions and 7 deletions
|
|
@ -216,6 +216,7 @@
|
|||
<ClInclude Include="..\Include\internal\pycore_complexobject.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_condvar.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_context.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_critical_section.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_crossinterp.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_descrobject.h" />
|
||||
<ClInclude Include="..\Include\internal\pycore_dict.h" />
|
||||
|
|
@ -548,6 +549,7 @@
|
|||
<ClCompile Include="..\Python\codecs.c" />
|
||||
<ClCompile Include="..\Python\compile.c" />
|
||||
<ClCompile Include="..\Python\context.c" />
|
||||
<ClCompile Include="..\Python\critical_section.c" />
|
||||
<ClCompile Include="..\Python\crossinterp.c" />
|
||||
<ClCompile Include="..\Python\dynamic_annotations.c" />
|
||||
<ClCompile Include="..\Python\dynload_win.c" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue