top | item 37450683

(no title)

adamch | 2 years ago

> tokio uses a 'static, threaded runtime that has its benefits but requires its futures to be Send and 'static.

This is only partly true -- if you want to `spawn` a task on another thread then yes it has to be Send and 'static. But if you use `spawn_local`, it spawns on the same thread, and it doesn't have to be Send (still has to be 'static).

discuss

order

No comments yet.