Skip to content

Return the future output #5

Description

@lastmjs

I would love to use this little function like I have been using tokio::runtime::Runtime::new().unwrap().block_on, which will return the result of the future so that I can easily move on with the value returned.

I am not sure how to achieve that with executor. I've been declaring a variable outside of the future closure and trying to mutate it from within the closure, so that I can use the value once the future has completed. It's not working out so well. What can be done?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions