Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › Io › Threaded › AlertableSyscall › finish Private Function finish Doc Source Private Function std.Io.Threaded.AlertableSyscall.finish
fn finish (s : AlertableSyscall ) void Params File Io/Threaded.zig: 1520
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536 fn finish (s : AlertableSyscall ) void {
comptime assert (is_windows );
const thread = s .thread orelse return ;
switch (thread .status .fetchXor (.{
.cancelation = @fromBackingInt (@intCast (0b010 )),
.awaitable = .null ,
}, .monotonic ).cancelation ) {
.none => unreachable ,
.parked => unreachable ,
.blocked => unreachable ,
.blocked_canceling => unreachable ,
.canceling => unreachable ,
.canceled => unreachable ,
.blocked_alertable => {}, // new status is `.none`
.blocked_alertable_canceling => {}, // new status is `.canceling`
}
}