diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-09-12 08:38:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-12 08:38:36 -0700 |
| commit | aa12534acff4868f6dce9e2364a66fbb0ebcb3ca (patch) | |
| tree | 98e1275557aa8876765e60303011bc3efc241004 /Modules/_scproxy.c | |
| parent | a00de685c11cf8bdca1f8efa7aab80552d80ddfb (diff) | |
| download | cpython-git-aa12534acff4868f6dce9e2364a66fbb0ebcb3ca.tar.gz | |
closes bpo-31903: Release the GIL when calling into SystemConfiguration (GH-4178)
(cherry picked from commit 4859ba0d2ce4506fddc3f55f90f8dce031b3804f)
Co-authored-by: Max Bélanger <aeromax@gmail.com>
Diffstat (limited to 'Modules/_scproxy.c')
| -rw-r--r-- | Modules/_scproxy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c index 1ce4b776f3..e37515ee65 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -62,7 +62,10 @@ get_proxy_settings(PyObject* mod __attribute__((__unused__))) PyObject* v; int r; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (!proxyDict) { Py_INCREF(Py_None); return Py_None; @@ -173,7 +176,10 @@ get_proxies(PyObject* mod __attribute__((__unused__))) int r; CFDictionaryRef proxyDict = NULL; + Py_BEGIN_ALLOW_THREADS proxyDict = SCDynamicStoreCopyProxies(NULL); + Py_END_ALLOW_THREADS + if (proxyDict == NULL) { return PyDict_New(); } |
