From 17a6609e2a21a130140e82fb56248eba46fba014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 7 Nov 2013 23:51:59 +0100 Subject: [PATCH] daemon: fixed race in start/stop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1028119 Signed-off-by: Jaroslav Škarvada --- tuned/daemon/daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned/daemon/daemon.py b/tuned/daemon/daemon.py index b1d76ea..1b46e13 100644 --- a/tuned/daemon/daemon.py +++ b/tuned/daemon/daemon.py @@ -64,7 +64,6 @@ class Daemon(object): self._save_active_profile(self._profile.name) self._unit_manager.start_tuning() - self._terminate.clear() while not tuned.utils.commands.wait(self._terminate, self._update_interval): log.debug("updating monitors") self._unit_manager.update_monitors() @@ -104,6 +103,7 @@ class Daemon(object): log.info("starting tuning") self._thread = threading.Thread(target=self._thread_code) + self._terminate.clear() self._thread.start() return True