Skip to content
Snippets Groups Projects
Commit 855cae27 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix LLThreadSafeQueueInterrupt in WorkQueueBase::postTo during shutdown by...

Fix LLThreadSafeQueueInterrupt in WorkQueueBase::postTo during shutdown by catching and returning false
parent 6954aafb
Branches
Tags
No related merge requests found
...@@ -516,6 +516,8 @@ namespace LL ...@@ -516,6 +516,8 @@ namespace LL
// Here we believe target WorkQueue still exists. Post to it a // Here we believe target WorkQueue still exists. Post to it a
// lambda that packages our callable, our callback and a weak_ptr // lambda that packages our callable, our callback and a weak_ptr
// to this originating WorkQueue. // to this originating WorkQueue.
try
{
tptr->post( tptr->post(
[reply = super::getWeak(), [reply = super::getWeak(),
callable = std::move(callable), callable = std::move(callable),
...@@ -547,6 +549,12 @@ namespace LL ...@@ -547,6 +549,12 @@ namespace LL
}, },
// if caller passed a TimePoint, pass it along to post() // if caller passed a TimePoint, pass it along to post()
std::forward<ARGS>(args)...); std::forward<ARGS>(args)...);
}
catch (const Closed&)
{
// target WorkQueue still exists, but is Closed
return false;
}
// looks like we were able to post() // looks like we were able to post()
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment