mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
unit_test::thread fixes:
* Fail on exception in unit_test::thread
* Add unit_test:🧵:detach()
This commit is contained in:
@@ -94,6 +94,12 @@ public:
|
|||||||
s_->propagate_abort();
|
s_->propagate_abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
detach()
|
||||||
|
{
|
||||||
|
t_.detach();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
swap (thread& other)
|
swap (thread& other)
|
||||||
{
|
{
|
||||||
@@ -112,6 +118,15 @@ private:
|
|||||||
catch (suite::abort_exception const&)
|
catch (suite::abort_exception const&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& e)
|
||||||
|
{
|
||||||
|
s_->fail ("unhandled exception: " +
|
||||||
|
std::string (e.what()));
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
s_->fail ("unhandled exception");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user