Commit b22a6773 authored by Steve Dower's avatar Steve Dower

Issue #27533: Release GIL in nt._isdir

parent bc3e9cac
...@@ -28,6 +28,8 @@ Core and Builtins ...@@ -28,6 +28,8 @@ Core and Builtins
Library Library
------- -------
- Issue #27533: Release GIL in nt._isdir
- Issue #17711: Fixed unpickling by the persistent ID with protocol 0. - Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
Original patch by Alexandre Vassalotti. Original patch by Alexandre Vassalotti.
......
...@@ -3878,10 +3878,12 @@ os__isdir_impl(PyObject *module, path_t *path) ...@@ -3878,10 +3878,12 @@ os__isdir_impl(PyObject *module, path_t *path)
{ {
DWORD attributes; DWORD attributes;
Py_BEGIN_ALLOW_THREADS
if (!path->narrow) if (!path->narrow)
attributes = GetFileAttributesW(path->wide); attributes = GetFileAttributesW(path->wide);
else else
attributes = GetFileAttributesA(path->narrow); attributes = GetFileAttributesA(path->narrow);
Py_END_ALLOW_THREADS
if (attributes == INVALID_FILE_ATTRIBUTES) if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE; Py_RETURN_FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment