summaryrefslogtreecommitdiff
path: root/src/db/update/UpdateGlue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/update/UpdateGlue.cxx')
-rw-r--r--src/db/update/UpdateGlue.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/db/update/UpdateGlue.cxx b/src/db/update/UpdateGlue.cxx
index 43c6a0bbc..40fe68afc 100644
--- a/src/db/update/UpdateGlue.cxx
+++ b/src/db/update/UpdateGlue.cxx
@@ -31,6 +31,10 @@
#include "thread/Thread.hxx"
#include "thread/Util.hxx"
+#ifndef NDEBUG
+#include "event/Loop.hxx"
+#endif
+
#include <assert.h>
inline void
@@ -73,7 +77,7 @@ UpdateService::Task(void *ctx)
void
UpdateService::StartThread(UpdateQueueItem &&i)
{
- assert(main_thread.IsInside());
+ assert(GetEventLoop().IsInside());
progress = UPDATE_PROGRESS_RUNNING;
modified = false;
@@ -100,7 +104,7 @@ UpdateService::GenerateId()
unsigned
UpdateService::Enqueue(const char *path, bool discard)
{
- assert(main_thread.IsInside());
+ assert(GetEventLoop().IsInside());
if (progress != UPDATE_PROGRESS_IDLE) {
const unsigned id = GenerateId();