Yes. The mediator in this case is the scheduler. The one that actually calls the asynchronous block. Potentially retrying it if it fails. In the OP’s code, there’s atomic blocks, sequential execution of blocks, stateful blocks, etc for ensuring singular access at a time.
The meat here is scheduler.cpp. It uses std::coroutines.
This is like async/await in other languages. The scheduler has a queue of work(coroutines) and a pool of threads(N>0) to execute those on.
In this case, messages are passed between work that contains the data. No locks are required at the expense of memory footprint.