summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-09 18:28:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:20 -0400
commitd9e0a12c2a9f7bf8843d8a9b969fb30f558df66b (patch)
treeb79c5ddcd515fdfbff112b6e9b75b1c9d200e245
parentcba4e76b2fc7c3524da42ccca33d47a13cc41c16 (diff)
downloadpython-systemd-d9e0a12c2a9f7bf8843d8a9b969fb30f558df66b.tar.gz
systemd-python: allow threads around flush
flush() is potentially costly.
-rw-r--r--systemd/login.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/systemd/login.c b/systemd/login.c
index b5cb811..1e86193 100644
--- a/systemd/login.c
+++ b/systemd/login.c
@@ -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;
}