aboutsummaryrefslogtreecommitdiff
path: root/lib/std/crypto
diff options
context:
space:
mode:
authorMatthew Lugg <mlugg@mlugg.co.uk>2025-12-15 11:24:26 +0000
committerMatthew Lugg <mlugg@mlugg.co.uk>2025-12-21 13:07:04 +0000
commit67eed9955005aaa02344b8d566ba140b9f2e0e18 (patch)
tree1f11358b2a1fd708738a93df52ff18175a7e2c7c /lib/std/crypto
parentfa7e818e144f2fd316fc54492f4699f6e1524738 (diff)
downloadzig-67eed9955005aaa02344b8d566ba140b9f2e0e18.tar.gz
zig-67eed9955005aaa02344b8d566ba140b9f2e0e18.zip
std.Io.Queue: introduce closure and fix a bug
Queues can now be "closed". A closed queue cannot have more elements appended with `put`, and blocked calls to `put` will immediately unblock having failed to append some elements. Calls to `get` will continue to succeed as long as the queue buffer is non-empty, but will then never block; already-blocked calls to `get` will unblock. All queue get/put operations can now return `error.Closed` to indicate that the queue has been closed. For bulk get/put operations, they may add/receive fewer elements than the minimum requested *if* the queue was closed or the calling task was canceled. In that case, if any elements were already added/received, they are returned first, and successive calls will return `error.Closed` or `error.Canceled`. Also, fix a bug where `Queue.get` could deadlock because it incorrectly blocked until the given buffer was *filled*. Resolves: #30141
Diffstat (limited to 'lib/std/crypto')
0 files changed, 0 insertions, 0 deletions