mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
macros: run runtime inside LocalSet when using macro (#4027)
This commit is contained in:
@@ -339,11 +339,10 @@ fn parse_knobs(
|
||||
{
|
||||
let body = async #body;
|
||||
#[allow(clippy::expect_used)]
|
||||
#tail_return #rt
|
||||
.enable_all()
|
||||
.build()
|
||||
.expect("Failed building the Runtime")
|
||||
.block_on(body)#tail_semicolon
|
||||
#tail_return tokio::task::LocalSet::new().block_on(
|
||||
&#rt.enable_all().build().expect("Failed building the Runtime"),
|
||||
body,
|
||||
)#tail_semicolon
|
||||
}
|
||||
})
|
||||
.expect("Parsing failure");
|
||||
|
||||
Reference in New Issue
Block a user