mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
@@ -227,13 +227,16 @@ public:
|
||||
|
||||
{
|
||||
auto coro = std::make_shared<JobQueue::Coro>(
|
||||
Coro_create_t{}, env.app().getJobQueue(), JobType::jtCLIENT, "test", [](auto coro) {
|
||||
Coro_create_t{},
|
||||
env.app().getJobQueue(),
|
||||
JobType::jtCLIENT,
|
||||
"test",
|
||||
[](auto coro) {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
pass();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -56,7 +56,9 @@ JobQueue::Coro::Coro(
|
||||
|
||||
inline JobQueue::Coro::~Coro()
|
||||
{
|
||||
XRPL_ASSERT(state_ != CoroState::Running, "ripple::JobQueue::Coro::~Coro : is not running");
|
||||
XRPL_ASSERT(
|
||||
state_ != CoroState::Running,
|
||||
"ripple::JobQueue::Coro::~Coro : is not running");
|
||||
exiting_ = true;
|
||||
// Resume the coroutine so that it has a chance to clean things up
|
||||
if (state_ == CoroState::Suspended)
|
||||
@@ -65,7 +67,9 @@ inline JobQueue::Coro::~Coro()
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
XRPL_ASSERT(state_ == CoroState::Finished, "ripple::JobQueue::Coro::~Coro : is finished");
|
||||
XRPL_ASSERT(
|
||||
state_ == CoroState::Finished,
|
||||
"ripple::JobQueue::Coro::~Coro : is finished");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -63,13 +63,7 @@ public:
|
||||
friend class JobQueue;
|
||||
|
||||
private:
|
||||
enum class CoroState
|
||||
{
|
||||
None,
|
||||
Suspended,
|
||||
Running,
|
||||
Finished
|
||||
};
|
||||
enum class CoroState { None, Suspended, Running, Finished };
|
||||
|
||||
detail::LocalValues lvs_;
|
||||
JobQueue& jq_;
|
||||
|
||||
Reference in New Issue
Block a user