3 ms·
> That's incorrect Is it? > the Send bounds are only there in the multithreaded runtime (because it might need to Send a task across threads). Tokio is inter
by masklinn 3y ago
> That's incorrect
Is it?
> the Send bounds are only there in the multithreaded runtime (because it might need to Send a task across threads).
Tokio is interacted with using free functions which dynamically look up the current runtime, they could not have a different signature even if tokio had different runtime types, which it does not.
> The single threaded runtime will never do that, so its futures don't need to be Send.
Please do point to the ?Send spawn (not spawn_local) which supposedly exists for the current_thread runtime. You can't even spawn_local at the toplevel of the current_thread runtime.