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

[Feature Request] Asynchronous Clients. #111

Open
yangby-cryptape opened this issue Mar 19, 2024 · 0 comments
Open

[Feature Request] Asynchronous Clients. #111

yangby-cryptape opened this issue Mar 19, 2024 · 0 comments

Comments

@yangby-cryptape
Copy link
Contributor

At present, CkbRpcClient is blocking:

$struct_name { url, id: 0.into(), client: reqwest::blocking::Client::new(), }

The docs of reqwest said, tokio::task::spawn_blocking is required.

When use CkbRpcClient in a async code block directly, it causes:

Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.

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

No branches or pull requests

1 participant