chiark / gitweb /
systemd-python: allow threads around flush
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 9 May 2013 22:28:15 +0000 (18:28 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 9 May 2013 22:28:24 +0000 (18:28 -0400)
flush() is potentially costly.

src/python-systemd/login.c

index b5cb811ec1ee46e7ca6fdcad8f4a3f18ddb9f287..1e86193f6be8f3a6ca29838ee6e53acfb4627e2a 100644 (file)
@@ -271,7 +271,9 @@ static PyObject* Monitor_flush(Monitor *self, PyObject *args)
         assert(self);
         assert(!args);
 
+        Py_BEGIN_ALLOW_THREADS
         sd_login_monitor_flush(self->monitor);
+        Py_END_ALLOW_THREADS
         Py_RETURN_NONE;
 }