Note that, when using a multithreaded
Futuremay move between threads, so any variables used in
asyncbodies must be able to travel between threads, as any
.awaitcan potentially result in a switch to a new thread.
This means that it is not safe to use
&RefCellor any other types that don't implement the
Sendtrait, including references to types that don't implement the
Does Rust actually compiles when
Rc is referenced in an
async body? I.e., should I manually think about this situation, or will Rust make sure such situation always cause a compile error?