From f86c4b9d9ecec2e8b312664fddc6ca7fb0b887fc Mon Sep 17 00:00:00 2001 From: Jcomp Date: Sun, 22 Oct 2023 13:11:21 +0000 Subject: [PATCH] Fix parallelism clean up issue --- src/main.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.d b/src/main.d index cc81d3b70..abd7fa2ea 100644 --- a/src/main.d +++ b/src/main.d @@ -1139,6 +1139,8 @@ extern(C) nothrow @nogc @system void exitHandler(int value) { try { assumeNoGC ( () { log.log("Got termination signal, performing clean up"); + // Wait for all parallel jobs that depend on the database to complete + taskPool.finish(true); // was itemDb initialised? if (itemDB.isDatabaseInitialised()) { // Make sure the .wal file is incorporated into the main db before we exit