-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upgrade from 0.1.2 to 0.1.4 causes hang #23
Comments
* current_thread: block_on futures needn't be static The current_thread runtime's `block_on` and `block_on_std` functions have `'static` bounds on the input future type. These are unnecessary, since the inner tokio 0.2 runtime doesn't require these bounds, and they aren't required by tokio 0.1, breaking API compatibility. Signed-off-by: Eliza Weisman <[email protected]> * threadpool: run futures needn't be static Similarly, futures passed to the threadpool's `run` also don't need `'static` bounds. This commit removes them. Signed-off-by: Eliza Weisman <[email protected]> * threadpool: fix `run`/`run_std` inconsistency Signed-off-by: Eliza Weisman <[email protected]> * threadpool: make `run` behave more like 0.1 Signed-off-by: Eliza Weisman <[email protected]>
Thanks for the report. I'll take a look! |
This is definitely related to the |
I am honestly pretty surprised that code that calls |
@hawkw we are surprised too! |
As far as a solution to this issue goes, I'm not really sure what to say. I'd be willing to change When If it's absolutely necessary to use Hopefully that makes sense, and, again, sorry for the breakage! |
@hawkw Thanks for looking into this! I'll be honest. I had glossed over our
I guess at this point, it seems like this isn't really Again, thanks for diving in! And thanks for tokio-compat! Like probably many others in the ecosystem right now, we're living in a split ecosystem, and tokio-compat is helping us navigate it just a little bit better while everyone works hard to make progress. |
Yeah, I think the documentation in the
Yeah, unfortunately, there's no runtime-agnostic concept of a "current executor" — My guess is that you should just be able to remove
Glad to help! If you have any more issues, please me us know, either by opening a new issue, or on the Tokio Discord server. |
@bryanburgers I'm going to close this issue, since I believe we found a solution. If anything else comes up, please do feel free to open new issues! |
A change in 1f2137b caused a hang in our application that did not exist in version 0.1.2.
Here's a reproduction of the issue.
Using
[email protected]
, this outputsUsing
[email protected]
, this hangs indefinitely.Notes:
I knowingly used an old version of
reqwest
in this reproduction. Our actual code usesrusoto
which doesn't have anasync
/await
-native version yet. Usingrusoto
in a reproduction is a pain because you need AWS credentials, though.The
run_std
thenblock_on
seems funny. Our actual code goes through both lambda_runtime and juniper, sorun_std
andblock_on
are quite far apart in our actual code, but are still necessary until more of the ecosystem catches up withasync
/await
.If we replace
with
we see the correct and expected behavior in both tokio-compat versions.
The text was updated successfully, but these errors were encountered: