We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const std = @import("std"); var defer1: bool = false; var defer2: bool = false; test "aoeu" { _ = async<std.debug.global_allocator> asyncTest() catch unreachable; std.debug.assert(defer1); std.debug.assert(defer2); } async fn asyncTest() void { defer { defer1 = true; } await (async baz() catch unreachable); } var bar_handle: promise = undefined; async fn baz() void { const foo_handle = async foo() catch unreachable; resume bar_handle; cancel bar_handle; defer { defer2 = true; } const value = await foo_handle; @panic("unreachable"); } async fn foo() i32 { await (async bar() catch unreachable); return 1234; } async fn bar() void { suspend |p| { bar_handle = p; } suspend; }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: