Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Function

cancelDiscard

Public Function
std.Io.Select.cancelDiscard
pub fn cancelDiscard(s: *S) void

Requests cancelation on all remaining tasks owned by the select, then blocks until they all finish.

All return values from outstanding tasks are discarded. This function is therefore inappropriate to call when a task can return an allocated resource. For that use case, see cancel.

It is illegal to call await or awaitMany after this.

It is safe to call this multiple times.

Threadsafe.

Params

  • s: *S

File

Io.zig:1653
1653
1654
1655
1656
1657
1658
1659
        pub fn cancelDiscard(s: *S) void {
            const io = s.io;
            const token = s.group.token.load(.acquire) orelse return;
            s.queue.close(io);
            io.vtable.groupCancel(io.userdata, &s.group, token);
            assert(s.group.token.raw == null);
        }