diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-07 09:18:37 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-07 09:18:37 +0200 |
| commit | 7cb7a9948a9f5c9965fedd59f0cd816f28962fe4 (patch) | |
| tree | 1953e653faba351ab103ec030eacbfc79b7dae6c /exercises/091_async8.zig | |
| parent | 1166f3cfb65d7edc9086c6ba6b8edd4754964b33 (diff) | |
| parent | 3574fd3ae037f34510c6bb6657332b57447ac5b1 (diff) | |
Merge branch 'main' into fix-060
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", .{}); -} |
