-
Notifications
You must be signed in to change notification settings - Fork 341
[email protected]: cannot run an executor inside another executor #766
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
This sounds like you are running |
@dignifiedquire I removed https://github.com/GopherJ/casbin-rs/tree/upgrade-async-std |
Also this error is a runtime error which makes it harder to identify during compile time, is it possible to locate it during compile time? cargo check always ok but when we run/test it, errors come |
I'm receiving the same error. At first it was throwing from a From inspecting the trace, it looks like there's a In my code, the
https://github.com/async-rs/async-std/blob/master/src/fs/file.rs#L318 Agree with @GopherJ -- if blocking inside a blocking scope is now illegal, then hopefully there is some static way to detect this, since any instance of a |
(this comment previously had an old investigation with some incorrect info, now I have updated it to be accurate) I just tested, and this is indeed failing: fn main() {
async_std::task::block_on(async move {
async_std::fs::File::open(".").await.unwrap();
});
} thread 'main' panicked at 'cannot run an executor inside another executor', <::std::macros::panic macros>:2:4 |
Thank you @andysalerno for the test and report. #768 fixes the case for |
after upgrading to 1.6.0-beta.1, I start to get this error message. Previous version: 1.5.0
The text was updated successfully, but these errors were encountered: