From: Christian Heimes Date: Sat, 23 Feb 2008 17:42:31 +0000 (+0000) Subject: Patch #1957: syslogmodule: Release GIL when calling syslog(3) X-Git-Tag: v2.6a1~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0476e816950928246ee11d873fb13a86c691fb6;p=python Patch #1957: syslogmodule: Release GIL when calling syslog(3) --- diff --git a/Misc/NEWS b/Misc/NEWS index e1fc418afb..7c81958a2e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1193,6 +1193,8 @@ Library Extension Modules ----------------- +- Patch #1957: syslogmodule: Release GIL when calling syslog(3) + - #2112: mmap.error is now a subclass of EnvironmentError and not a direct EnvironmentError diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 4a77916942..9e1ed0619f 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -92,7 +92,9 @@ syslog_syslog(PyObject * self, PyObject * args) return NULL; } + Py_BEGIN_ALLOW_THREADS; syslog(priority, "%s", message); + Py_END_ALLOW_THREADS; Py_INCREF(Py_None); return Py_None; }