Drop on `await` point
Rust Internals [Unofficial]
March 31, 2026
So this sounds like a sort of "space between two yield points is a sort of scope".
I wonder if you can get part way there by using this sort of a pattern:
async {
{
let guard = mutex.lock();
//...sync operations...
}
foo().await;
{
//...more sync ops
}
}
Discussion in the ATmosphere