-
-
Save jamii/293785ddac27003cd7189001eed5d44d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a_frame: anyframe = undefined; | |
fn a() void { | |
suspend { | |
a_frame = @frame(); | |
} | |
} | |
fn b() u64 { | |
a(); | |
return 1; | |
} | |
fn amain() void { | |
var b_frame = async b(); | |
resume a_frame; | |
@import("std").debug.print("{}", .{await b_frame}); | |
} | |
pub fn main() void { | |
nosuspend amain(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment