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 {
|
std::thread([promise{std::move(promise)}, this, avail, getAvail]() mutable {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
/* Wake up any threads waiting for the auto-GC to finish. */
|
/* Wake up any threads waiting for the auto-GC to finish. */
|
||||||
Finally wakeup([&]() {
|
Finally wakeup([&]() {
|
||||||
auto state(_state.lock());
|
auto state(_state.lock());
|
||||||
|
@ -906,6 +908,12 @@ void LocalStore::autoGC(bool sync)
|
||||||
|
|
||||||
_state.lock()->availAfterGC = getAvail();
|
_state.lock()->availAfterGC = getAvail();
|
||||||
|
|
||||||
|
} catch (...) {
|
||||||
|
// FIXME: we could propagate the exception to the
|
||||||
|
// future, but we don't really care.
|
||||||
|
ignoreException();
|
||||||
|
}
|
||||||
|
|
||||||
}).detach();
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue