mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
@@ -121,7 +121,7 @@ class JobQueue_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
while (yieldCount == 0)
|
||||
; // We should wait for the job to start and yield
|
||||
; // We should wait for the job to start and yield
|
||||
|
||||
// Wait for the Job to run and yield.
|
||||
coro->join();
|
||||
|
||||
@@ -96,7 +96,9 @@ JobQueue::Coro::yield()
|
||||
inline bool
|
||||
JobQueue::Coro::post()
|
||||
{
|
||||
XRPL_ASSERT(state_ == CoroState::Suspended, "JobQueue::Coro::post: coroutine should be suspended!");
|
||||
XRPL_ASSERT(
|
||||
state_ == CoroState::Suspended,
|
||||
"JobQueue::Coro::post: coroutine should be suspended!");
|
||||
|
||||
// sp keeps 'this' alive
|
||||
if (jq_.addJob(
|
||||
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
|
||||
public:
|
||||
enum class CoroState { None, Suspended, Running, Finished };
|
||||
private:
|
||||
|
||||
private:
|
||||
std::atomic_bool exiting_ = false;
|
||||
detail::LocalValues lvs_;
|
||||
JobQueue& jq_;
|
||||
@@ -131,7 +131,10 @@ public:
|
||||
resume();
|
||||
|
||||
CoroState
|
||||
state() const { return state_; }
|
||||
state() const
|
||||
{
|
||||
return state_;
|
||||
}
|
||||
|
||||
/** Returns true if the Coro is still runnable (has not returned). */
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user