From: Steve Dower Date: Mon, 18 Jul 2016 03:49:38 +0000 (-0700) Subject: Issue #27533: Release GIL in nt._isdir X-Git-Tag: v3.6.0a4~154^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b22a67737ea20f8646540903d32149ed7d5af3eb;p=python Issue #27533: Release GIL in nt._isdir --- diff --git a/Misc/NEWS b/Misc/NEWS index 714bf6a257..ad0eafa70d 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 3c3f80660c..ee600fc237 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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;