Skip to content
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

Fix 'Cannot drop a runtime' error #146

Merged

Conversation

olegchir
Copy link
Contributor

@olegchir olegchir commented Jul 8, 2022

This commit fixes immediate client crash in the interactive actix-example.

I used the solution provided in another similar reqwest bug.

It appears that blocking and async do not mix, as reqwest's documentation said.

  • [+] I have read the contribution guidelines
  • [-] This change has no tests
  • [-] This change has no documentation

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

@olegchir olegchir force-pushed the fix-actix-example-blocking branch from 52a5020 to a2f212f Compare July 8, 2022 00:56
@HeroicKatora
Copy link
Owner

Thanks! Seems like a no brainer to merge this, although I'm honestly bewildered how this issue could be considered acceptable behavior in the reqwest/tokio combination. Not like blocking is ever incorrect (even less so from a pure type standpoint) so I'm unsure why it leads to outright panic.

If you're looking for further contributions then you might be interested in reworking examples to full asynchronous code. Most were created when async fn was still young so the style is almost certainly no longer considered idiomatic.

@HeroicKatora HeroicKatora merged commit 624ac86 into HeroicKatora:master Jul 9, 2022
@olegchir
Copy link
Contributor Author

olegchir commented Jul 11, 2022

If you're looking for further contributions then you might be interested in reworking examples to full asynchronous code.

I'm a total noob in Rust. Coz I'm a backend Java developer who's trying to move to Rust in some performance-critical applications.

I'll try to fix the errors I'll find, but I surely will need your review, coz at the moment I can't tell a difference between idiomatic and non-idiomatic code :)

Thank you for merging :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants