How do you encode the locking issue in the type system, it seems magical? Can you just never hold any locks when calling await, is it smart enough to know that this scheduler might move work between threads?
replies(5):
Rust can use that type information and lifetimes to figure out when it's safe and when not.