mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
The `@critical_section` directive instructs Argument Clinic to generate calls to `Py_BEGIN_CRITICAL_SECTION()` and `Py_END_CRITICAL_SECTION()` around the bound function. In `--disable-gil` builds, these calls will lock and unlock the `self` object. They are no-ops in the default build. This is used in one place (`_io._Buffered.close`) as a demonstration. Subsequent PRs will use it more widely in the `_io.Buffered` bindings. |
||
|---|---|---|
| .. | ||
| _iomodule.c.h | ||
| bufferedio.c.h | ||
| bytesio.c.h | ||
| fileio.c.h | ||
| iobase.c.h | ||
| stringio.c.h | ||
| textio.c.h | ||
| winconsoleio.c.h | ||