[Python-checkins] r61001 - in python/trunk: Misc/NEWS Modules/syslogmodule.c

christian.heimes python-checkins at python.org
Sat Feb 23 18:42:31 CET 2008


Author: christian.heimes
Date: Sat Feb 23 18:42:31 2008
New Revision: 61001

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Modules/syslogmodule.c
Log:
Patch #1957: syslogmodule: Release GIL when calling syslog(3)

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat Feb 23 18:42:31 2008
@@ -1193,6 +1193,8 @@
 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
 

Modified: python/trunk/Modules/syslogmodule.c
==============================================================================
--- python/trunk/Modules/syslogmodule.c	(original)
+++ python/trunk/Modules/syslogmodule.c	Sat Feb 23 18:42:31 2008
@@ -92,7 +92,9 @@
 			return NULL;
 	}
 
+	Py_BEGIN_ALLOW_THREADS;
 	syslog(priority, "%s", message);
+	Py_END_ALLOW_THREADS;
 	Py_INCREF(Py_None);
 	return Py_None;
 }


More information about the Python-checkins mailing list