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
The async_std::task::Builder and async_std::task::spawn methods assume that some kind of environment is present (ie. a background thread pool) where to spawn tasks.
@tomaka on phone right now — but would perhaps an acceptable short-term solution to your issue be to allow async-std to work in the browser? Specifically task::spawn.
It's not urgent at all!
My browser experiments work by merging everything into a single future. I don't spawn anything in the background at the moment.
As this is mostly already covered by #79, I'm going to go ahead and close this issue. We should continue to gather input on what folks want to configure and report it back in #79.
The
async_std::task::Builder
andasync_std::task::spawn
methods assume that some kind of environment is present (ie. a background thread pool) where to spawn tasks.async-std/src/task/pool.rs
Lines 172 to 192 in 532c73c
Crates that provide some sort of hidden environment generally provide a way to configure how it works. Example of what I mean:
Similarly, I think
async_std
should provide some sort ofset_task_spawner
function that allows configuring how that works.The use-case I have in mind is the browser environment, where you want to drive tasks by using
spawn_local
(which is implemented usingsetTimeout
).The text was updated successfully, but these errors were encountered: