mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-03 11:12:34 +00:00
When post() is called from within the coroutine body (via JobQueueAwaiter), two resume operations can overlap: R1 is still running while R2 is queued. With a boolean running_ flag, R1's cleanup (running_=false) clobbers R2's pending state, causing join() to return prematurely on ARM64. Replace bool running_ with int runCount_: post() increments before enqueue, resume() decrements after completion. join() waits for runCount_==0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>