You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very cool if a Compat could be produced for consuming the Spawner in the Tokio Handler so that the non-tokio runtime can spawn Tokio tasks.
The way I'm thinking to do it is to first, have the background thread do a sleep(u64::MAX) so that it can never process any spawned tasks.
Then, we hijack the Spawner from the handler (currently impossible as spawner field along with other needed data types are pub(crate)) and process tasks from it by putting them onto the current runtime's task queue.
The text was updated successfully, but these errors were encountered:
It would be very cool if a Compat could be produced for consuming the Spawner in the Tokio Handler so that the non-tokio runtime can spawn Tokio tasks.
The way I'm thinking to do it is to first, have the background thread do a
sleep(u64::MAX)
so that it can never process any spawned tasks.Then, we hijack the Spawner from the handler (currently impossible as spawner field along with other needed data types are
pub(crate)
) and process tasks from it by putting them onto the current runtime's task queue.The text was updated successfully, but these errors were encountered: