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 b5cb811..1e86193 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;
 }