aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/Service.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-27 16:36:11 +0100
committerMax Kellermann <max@duempel.org>2014-02-27 16:58:35 +0100
commit681e012fb542ee1bb2ea5312dc673987a7a8ee29 (patch)
tree2887e01d906c89f99516d67c555a2318473cc169 /src/db/update/Service.hxx
parent3be36643a1bded02171d8ddaac7d7aecfdc1915a (diff)
downloadmpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.tar.gz
mpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.tar.xz
mpd-681e012fb542ee1bb2ea5312dc673987a7a8ee29.zip
db/update: cancel the update on shutdown
Diffstat (limited to 'src/db/update/Service.hxx')
-rw-r--r--src/db/update/Service.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/db/update/Service.hxx b/src/db/update/Service.hxx
index 936c2bb55..ebdda7bd1 100644
--- a/src/db/update/Service.hxx
+++ b/src/db/update/Service.hxx
@@ -64,6 +64,8 @@ public:
Storage &_storage,
DatabaseListener &_listener);
+ ~UpdateService();
+
/**
* Returns a non-zero job id when we are currently updating
* the database.
@@ -82,6 +84,12 @@ public:
gcc_nonnull_all
unsigned Enqueue(const char *path, bool discard);
+ /**
+ * Clear the queue and cancel the current update. Does not
+ * wait for the thread to exit.
+ */
+ void CancelAllAsync();
+
private:
/* virtual methods from class DeferredMonitor */
virtual void RunDeferred() override;