diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-03 19:32:53 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-03 19:32:53 +0200 |
| commit | 5307b2a338a92130bc498fb1dc7d21a9fd1b0db4 (patch) | |
| tree | 51279ca4fbd7bd90294dd563640c12a8c25c79c6 /exercises/085_async2.zig | |
| parent | 3056a2b5442f2f1ec58db3f3493109064ad2a2a5 (diff) | |
| parent | f6a6798c8b6b813bd2ceee81db276e05327a76e0 (diff) | |
Merge pull request 'revival of the async-io functions' (#383) from asyncIo into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/383
Diffstat (limited to 'exercises/085_async2.zig')
| -rw-r--r-- | exercises/085_async2.zig | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/exercises/085_async2.zig b/exercises/085_async2.zig deleted file mode 100644 index 036aefa..0000000 --- a/exercises/085_async2.zig +++ /dev/null @@ -1,28 +0,0 @@ -// -// So, 'suspend' returns control to the place from which it was -// called (the "call site"). How do we give control back to the -// suspended function? -// -// For that, we have a new keyword called 'resume' which takes an -// async function invocation's frame and returns control to it. -// -// fn fooThatSuspends() void { -// suspend {} -// } -// -// var foo_frame = async fooThatSuspends(); -// resume foo_frame; -// -// See if you can make this program print "Hello async!". -// -const print = @import("std").debug.print; - -pub fn main() void { - var foo_frame = async foo(); -} - -fn foo() void { - print("Hello ", .{}); - suspend {} - print("async!\n", .{}); -} |
