From f772be911c9814ece22a1a0d1710f8e6e12adcdc Mon Sep 17 00:00:00 2001 From: guinux Date: Sun, 14 May 2017 15:43:08 +0200 Subject: [PATCH] improve deemon quit --- src/daemon.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/daemon.vala b/src/daemon.vala index 1a20fa7..2e449c9 100644 --- a/src/daemon.vala +++ b/src/daemon.vala @@ -2247,10 +2247,9 @@ namespace Pamac { [DBus (no_reply = true)] public void quit () { - // be sure to not quit with locked databases - if (thread_pool.unprocessed () == 0) { - loop.quit (); - } + // wait for all tasks to be processed + ThreadPool.free ((owned) thread_pool, false, true); + loop.quit (); } // End of Daemon Object }