-
Notifications
You must be signed in to change notification settings - Fork 340
"Cannot run an executor inside another executor" - in tests #795
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
I think this is the result of calling task::block_on() in another task::block_on() here is a example of this failing: https://github.com/Licenser/nested-executors This seems to be a very serious limitation as it makes it virtually impossible to use it in any place other than the mainline of a binary. For example if a library exposes asynchronous interface and uses any asynchronous code underneath it blocks on, this library can't be used in any other asynchronous function any more. Unless you know the source of it, the error is also not exactly pointing users to the right place as it requires the knowledge that |
This is related to #760 |
The a-chat example program runs with the same error. |
The problem here is that nested calls to This is unfortunate, but also solves a pretty serious bug. For the exact details or inquiries it's probably best to raise it in
Oh no! -- we should patch this! |
@yoshuawuyts ty, will update deps and try to find nested calls. |
1.6
version ofasync-std
crashed our tests that works fine on prev version.According to the stack trace
asycn-std
fails onstream.flush().await.map_err(|e| e.to_string())?;
usage with a strange error message about executor inside another executor while we use#[async-std]
attribute on tests and do not create executors here.Maybe recent changes in
sync
module (for example we found a need to useResult
instead ofOption
inchannel::Receiver
) and our usage of it were the cause.The text was updated successfully, but these errors were encountered: