Skip to content

[Feature Request] Asynchronous Clients. #111

@chaoticlonghair

Description

@chaoticlonghair

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions