Fix formatting

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
JCW
2025-09-08 14:53:29 +01:00
parent ed6dcdb10f
commit 32a3f0a867
4 changed files with 10 additions and 6 deletions

View File

@@ -212,7 +212,6 @@ public:
BEAST_EXPECT(shouldStop.has_value() && *shouldStop == true);
}
void
run() override
{

View File

@@ -43,7 +43,7 @@ JobQueue::Coro::Coro(
yield();
if (!shouldStop())
{
fn(shared_from_this());
fn(shared_from_this());
}
#ifndef NDEBUG
finished_ = true;

View File

@@ -61,6 +61,7 @@ public:
class Coro : public std::enable_shared_from_this<Coro>
{
friend class JobQueue;
private:
detail::LocalValues lvs_;
JobQueue& jq_;
@@ -286,9 +287,12 @@ private:
if (auto coroPtr = coro.lock())
{
if (auto optionalCountedJob =
jobCounter_.wrap([=]() { coroPtr->resume(); }))
jobCounter_.wrap([=]() { coroPtr->resume(); }))
{
addRefCountedJob(coroPtr->type_, coroPtr->name_, std::move(*optionalCountedJob));
addRefCountedJob(
coroPtr->type_,
coroPtr->name_,
std::move(*optionalCountedJob));
}
}
}

View File

@@ -327,8 +327,9 @@ JobQueue::stop()
// `Job::doJob` and the return of `JobQueue::processTask`. That is why
// we must wait on the condition variable to make these assertions.
std::unique_lock<std::mutex> lock(m_mutex);
cv_.wait(
lock, [this] { return m_processCount == 0 && nSuspend_ == 0 && m_jobSet.empty(); });
cv_.wait(lock, [this] {
return m_processCount == 0 && nSuspend_ == 0 && m_jobSet.empty();
});
XRPL_ASSERT(
m_processCount == 0,
"ripple::JobQueue::stop : all processes completed");