mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-05 01:36:38 +00:00
style: fix clang-format for Coro.ipp
This commit is contained in:
@@ -164,14 +164,13 @@ JobQueue::Coro::postAndYield()
|
||||
yielding_.store(false, std::memory_order_release);
|
||||
|
||||
// Post a job that waits for yield to be ready, then resumes
|
||||
if (!jq_.addJob(
|
||||
type_, name_, [this, sp = shared_from_this()]() {
|
||||
// Spin-wait until yield() is about to happen
|
||||
// yielding_ is set true immediately before (*yield_)() is called
|
||||
while (!yielding_.load(std::memory_order_acquire))
|
||||
std::this_thread::yield();
|
||||
resume();
|
||||
}))
|
||||
if (!jq_.addJob(type_, name_, [this, sp = shared_from_this()]() {
|
||||
// Spin-wait until yield() is about to happen
|
||||
// yielding_ is set true immediately before (*yield_)() is called
|
||||
while (!yielding_.load(std::memory_order_acquire))
|
||||
std::this_thread::yield();
|
||||
resume();
|
||||
}))
|
||||
{
|
||||
std::lock_guard lk(mutex_run_);
|
||||
running_ = false;
|
||||
|
||||
Reference in New Issue
Block a user