0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
zml/stdx/stdx.zig
Benjamin Rabier 6a155f7907 stdx: add FirstError, the first error of concurrent tasks
Tasks that run concurrently and may each fail often need to keep the first
failure and let the others see it. FirstError(E) keeps it in one atomic
word: set stores an error unless one is already kept and says whether it
kept this one, and get reads it back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:41:11 +01:00

172 lines
5.8 KiB