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

macros: run current_thread inside LocalSet #4027

Merged
merged 2 commits into from
Sep 15, 2021
Merged

macros: run current_thread inside LocalSet #4027

merged 2 commits into from
Sep 15, 2021

Commits on Aug 28, 2021

  1. macros: execute async function inside LocalSet

    Make the #[tokio::main] and #[tokio::test] macros run the function body
    in a LocalSet so that tokio::task::spawn_local() just works.
    
    It's very helpful when you have hundreds of tests and don't want to
    repeat the same LocalSet::new().run_until(...) stanza every time.
    bnoordhuis committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    776d4b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c150c7d View commit details
    Browse the repository at this point in the history