diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-04-01 16:34:32 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-04-01 16:34:32 (GMT) |
commit | 6f4fae8a951d95acf7a9151ed13a45dc3e395b9f (patch) | |
tree | 3511c602268ca6721bc246df89e8518dac199d72 | |
parent | 82c3e4599d067f7dc72cea1530d3a26ba1682028 (diff) | |
download | cpython-6f4fae8a951d95acf7a9151ed13a45dc3e395b9f.zip cpython-6f4fae8a951d95acf7a9151ed13a45dc3e395b9f.tar.gz cpython-6f4fae8a951d95acf7a9151ed13a45dc3e395b9f.tar.bz2 |
Issue #23836: Document functions releasing the GIL in fileutils.c
-rw-r--r-- | Python/fileutils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index e4c5241..64368f3 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -667,7 +667,8 @@ _Py_fstat_noraise(int fd, struct _Py_stat_struct *status) error on error. On POSIX, set errno on error. Fill status and return 0 on success. - The GIL must be held. */ + Release the GIL to call GetFileType() and GetFileInformationByHandle(), or + to call fstat(). The caller must hold the GIL. */ int _Py_fstat(int fd, struct _Py_stat_struct *status) { @@ -968,7 +969,7 @@ _Py_open_impl(const char *pathname, int flags, int gil_held) When interrupted by a signal (open() fails with EINTR), retry the syscall, except if the Python signal handler raises an exception. - The GIL must be held. */ + Release the GIL to call open(). The caller must hold the GIL. */ int _Py_open(const char *pathname, int flags) { @@ -1054,7 +1055,8 @@ _Py_fopen(const char *pathname, const char *mode) When interrupted by a signal (open() fails with EINTR), retry the syscall, except if the Python signal handler raises an exception. - The GIL must be held. */ + Release the GIL to call _wfopen() or fopen(). The caller must hold + the GIL. */ FILE* _Py_fopen_obj(PyObject *path, const char *mode) { |