macro_rules! async_scope {
($scope:ident, $body:block) => { ... };
}Available on crate feature
alloc only.Expand description
Runs a body with a local asynchronous cleanup scope.
After the body completes, registered actions run before its value is
returned. A return or ? exits the body future, so cleanup still runs.
Panicking or dropping the returned future may leave cleanup actions unrun.