mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-09 17:32:34 +02:00
Update main.d
* Wait for all parallel jobs that depend on the database to complete - added from f86c4b9d9e
This commit is contained in:
parent
9837e59ddc
commit
b9f20cd357
|
@ -1139,12 +1139,14 @@ extern(C) nothrow @nogc @system void exitHandler(int value) {
|
||||||
try {
|
try {
|
||||||
assumeNoGC ( () {
|
assumeNoGC ( () {
|
||||||
log.log("Got termination signal, performing clean up");
|
log.log("Got termination signal, performing clean up");
|
||||||
// was itemDb initialised?
|
// Wait for all parallel jobs that depend on the database to complete
|
||||||
|
taskPool.finish(true);
|
||||||
|
// Was itemDb initialised?
|
||||||
if (itemDB.isDatabaseInitialised()) {
|
if (itemDB.isDatabaseInitialised()) {
|
||||||
// Make sure the .wal file is incorporated into the main db before we exit
|
// Make sure the .wal file is incorporated into the main db before we exit
|
||||||
log.log("Shutting down DB connection and merging temporary data");
|
log.log("Shutting down DB connection and merging temporary data");
|
||||||
itemDB.performVacuum();
|
itemDB.performVacuum();
|
||||||
destroy(itemDB);
|
object.destroy(itemDB);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
} catch(Exception e) {}
|
} catch(Exception e) {}
|
||||||
|
|
Loading…
Reference in a new issue