如何在同步的 Rust 方法中调用异步代码 - Tokio 使用中的几点教训 #98
Replies: 1 comment
-
例子这样看上去更干净些 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
如何在同步的 Rust 方法中调用异步代码 - Tokio 使用中的几点教训
在同步的 Rust 方法中调用异步代码经常会导致一些问题,特别是对于不熟悉异步 Rust runtime 底层原理的初学者。在本文中,我们将讨论我们遇到的一个特殊问题,并分享我们采取的解决方法的经验。
最近在做我们的 GreptimeDB 项目的时候遇到一个关于在同步 Rust 方法中调用异步代码的问题。经过一系列故障排查后,我们弄清了问题的原委,这大大加深了对异步 Rust 的理解,因此在这篇
https://rustmagazine.org/issue-3/bridging-async-and-sync-in-rust-zh/
Beta Was this translation helpful? Give feedback.
All reactions