Skip to content

with_tokio_rt closure requires to pass Runtime #580

@gz

Description

@gz

It would be nice if with_tokio_rt also works with closures that e.g., return Arc<Runtime> or similar.

e.g., my use-case is that my tokio runtime is declared as

pub static TOKIO: Lazy<Runtime> = Lazy::new(|| Runtime::new().unwrap());

to share it across the code and I'd like to be able to pass it to System::with_tokio_rt too, but Runtime doesn't implement Copy.

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