Skip to content

Io.Group.wait replaced with Io.Group.awaitUncancelable - #2546

Merged
techatrix merged 6 commits into
zigtools:masterfrom
jozip:master
Jan 5, 2026
Merged

techatrix merged 6 commits into
zigtools:masterfrom
jozip:master

Conversation

@jozip

@jozip jozip commented Jan 1, 2026 •

Copy link
Copy Markdown
Contributor

Io.Group.wait doesn't exist as of (at least) zig-0.16.0-dev.1889+4ad8bc341. My guess is that Io.Group.awaitUncancelable is the correct analogue, since all the tests pass and everything seem to work properly. Whether or not it's desirable having (a)wait being "uncancelable", I leave it as an exercise for those better in the know.

Edit: Whoops, there is no such thing as std.Group.

@xdBronch

xdBronch commented Jan 3, 2026

Copy link
Copy Markdown
Member

it just got introduced but fyi awaitUncancelable is being removed in https://codeberg.org/ziglang/zig/pulls/30634 😄

@jozip

jozip commented Jan 3, 2026

Copy link
Copy Markdown
Contributor Author

it just got introduced but fyi awaitUncancelable is being removed in https://codeberg.org/ziglang/zig/pulls/30634 😄

Haha, I should've known 😄 Thanks for the heads-up! I guess I can become better-in-the-know myself by taking a stab at how cancellation is supposed to work here.

@jozip

jozip commented Jan 3, 2026

Copy link
Copy Markdown
Contributor Author

From what I gather, we don't care about await returning error.Cancelable the way it's used here. It feels weird to just ignore the error, but right now I can't see how it makes sense to handle it any other way.

@techatrix

Copy link
Copy Markdown
Member

As far as I know, you should generally let the cancellation error bubble up the call stack instead of ignoring it.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/fd0ca39c92fdb4012ed8d60e1683c26fddadd136?narHash=sha256-DegN7KD/EtFSKXf2jvqL6lvev6GlfAAatYBcRC8goEo%3D' (2025-12-25)
  → 'github:NixOS/nixpkgs/40ee5e1944bebdd128f9fbada44faefddfde29bd?narHash=sha256-0MnuWoN%2Bn1UYaGBIpqpPs9I9ZHW4kynits4mrnh1Pk4%3D' (2025-12-29)
• Updated input 'zig-overlay':
    'github:mitchellh/zig-overlay/d0d74182d45d3dea8eee91c8fb8e7f735306349e?narHash=sha256-lCw6MKbf1XbGB8m4EwVACm4IyIBThg2JI1ysqYZ2gc4%3D' (2025-12-29)
  → 'github:mitchellh/zig-overlay/501956cc4a633fdc744dc4cdd88ce12c65b7fc65?narHash=sha256-rNGKx9KO30dKt1wfpf6F0DrUaqp4jRZoqUi6%2BFy32yM%3D' (2026-01-05)
@techatrix
techatrix merged commit e8a6074 into zigtools:master Jan 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants