mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-03 19:06:16 +02:00
Fix abort when the GC thread gets an exception
This commit is contained in:
parent
0b606aad46
commit
1277aab219
1 changed files with 21 additions and 13 deletions
|
@ -887,6 +887,8 @@ void LocalStore::autoGC(bool sync)
|
|||
|
||||
std::thread([promise{std::move(promise)}, this, avail, getAvail]() mutable {
|
||||
|
||||
try {
|
||||
|
||||
/* Wake up any threads waiting for the auto-GC to finish. */
|
||||
Finally wakeup([&]() {
|
||||
auto state(_state.lock());
|
||||
|
@ -906,6 +908,12 @@ void LocalStore::autoGC(bool sync)
|
|||
|
||||
_state.lock()->availAfterGC = getAvail();
|
||||
|
||||
} catch (...) {
|
||||
// FIXME: we could propagate the exception to the
|
||||
// future, but we don't really care.
|
||||
ignoreException();
|
||||
}
|
||||
|
||||
}).detach();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue