Issue #27533: Release GIL in nt._isdir

This commit is contained in:
Steve Dower 2016-07-17 20:49:38 -07:00
parent bc3e9cac7c
commit b22a67737e
2 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,8 @@ Core and Builtins
Library
-------
- Issue #27533: Release GIL in nt._isdir
- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
Original patch by Alexandre Vassalotti.

View File

@ -3878,10 +3878,12 @@ os__isdir_impl(PyObject *module, path_t *path)
{
DWORD attributes;
Py_BEGIN_ALLOW_THREADS
if (!path->narrow)
attributes = GetFileAttributesW(path->wide);
else
attributes = GetFileAttributesA(path->narrow);
Py_END_ALLOW_THREADS
if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE;