-
Notifications
You must be signed in to change notification settings - Fork 340
task::spawn_local only available in feature = ["unstable"] #815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here the error message: Compiling async_std_unstable v0.1.0 (C:\Users\Richard\Programming\Rust\async_std_unstable) error: aborting due to previous error For more information about this error, try To learn more, run the command again with --verbose. |
Here the Cargo.toml file: [package] [dependencies] |
Here the relevant portion of the docs:
|
I have checked the source code. That's true, in the doc this function is not unstable. But actually you can only under unstable feature to use it. I have no idea whether to change the doc or the source code, could this function be stable? What's the standard for a function to be stable? |
|
I wonder if it would make sense to only enable If executor threads run thread local executors, that means the event loop can't be moved onto a new thread, if need be. I can see us locking out of some amazing optimizations if we allow thread-local tasks on executor threads. |
@stjepang do you have any ideas what that API would look like? Would it panic if called inside executor threads? Adding this restriction is certainly possible. I'd be curious to know more on how people are using this. The main use I have for |
Until the exact API is figured out, the API doc should contain some more usage instructions:
|
I'm currently having a problem where a task started in |
Please forgive my lack of knowledge of the terminology, I'm new to async-std and async in general. Is |
I think I might figured out that my problem was that the thread which called the |
The function 'task::spawn_local' is only behind the 'unstable' feature. However in the docs this function isn't marked as unstable. Is it actually unstable or not?
The text was updated successfully, but these errors were encountered: