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/091_async8.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/091_async8.zig')
| -rw-r--r-- | exercises/091_async8.zig | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/exercises/091_async8.zig b/exercises/091_async8.zig deleted file mode 100644 index cd9c975..0000000 --- a/exercises/091_async8.zig +++ /dev/null @@ -1,35 +0,0 @@ -// -// You have doubtless noticed that 'suspend' requires a block -// expression like so: -// -// suspend {} -// -// The suspend block executes when a function suspends. To get -// sense for when this happens, please make the following -// program print the string -// -// "ABCDEF" -// -const print = @import("std").debug.print; - -pub fn main() void { - print("A", .{}); - - var frame = async suspendable(); - - print("X", .{}); - - resume frame; - - print("F", .{}); -} - -fn suspendable() void { - print("X", .{}); - - suspend { - print("X", .{}); - } - - print("X", .{}); -} |
