improve deemon quit

This commit is contained in:
guinux 2017-05-14 15:43:08 +02:00
parent dee861da3d
commit f772be911c

View File

@ -2247,10 +2247,9 @@ namespace Pamac {
[DBus (no_reply = true)] [DBus (no_reply = true)]
public void quit () { public void quit () {
// be sure to not quit with locked databases // wait for all tasks to be processed
if (thread_pool.unprocessed () == 0) { ThreadPool.free ((owned) thread_pool, false, true);
loop.quit (); loop.quit ();
}
} }
// End of Daemon Object // End of Daemon Object
} }