diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-03 14:28:19 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-04-03 14:28:19 +0200 |
| commit | 25009361533be5e45cf59d9840edf5d13cfb8d6d (patch) | |
| tree | 0bf1f331b8162d1b378f0c3c9c291eddc9c0fba3 /patches | |
| parent | 903c33cd0a6dfdc050e8575f64aa60a9a09001e0 (diff) | |
new async exercise
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/patches/093_async10.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/patches/093_async10.patch b/patches/patches/093_async10.patch new file mode 100644 index 0000000..69f7518 --- /dev/null +++ b/patches/patches/093_async10.patch @@ -0,0 +1,13 @@ +--- exercises/093_async10.zig 2026-04-03 14:25:16.600025924 +0200 ++++ answers/093_async10.zig 2026-04-03 14:24:56.192615893 +0200 +@@ -50,8 +50,8 @@ + + // Protect this section from cancellation. + // What method swaps the cancel protection state? +- const old = io.???(. blocked); +- defer _ = io.???(old); ++ const old = io.swapCancelProtection(.blocked); ++ defer _ = io.swapCancelProtection(old); + + // This sleep will NOT return error.Canceled even though + // we get canceled during it — protection is active! |
