
Concurrency
LocalSet and Non Send Futures in Tokio Explained Made Clear
tokio::spawn demands Send because tasks can move between threads. LocalSet pins tasks to one thread so Rc, RefCell and other !Send types can cross awaits.
7 min read
Tag
1 post

tokio::spawn demands Send because tasks can move between threads. LocalSet pins tasks to one thread so Rc, RefCell and other !Send types can cross awaits.