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

cancel

Public Function
std.Io.Group.cancel
pub fn cancel(g: *Group, io: Io) void

Equivalent to await but immediately requests cancelation on all members of the group.

After this function returns, all tasks of the Group created with async or concurrent are guaranteed to have run.

For a description of cancelation and cancelation points, see Future.cancel.

Idempotent. Not threadsafe.

It is safe to call this function concurrently with Group.async or Group.concurrent, provided that the group does not complete until the call to Group.async or Group.concurrent returns.

Params

File

Io.zig:1421
1421
1422
1423
1424
1425
    pub fn cancel(g: *Group, io: Io) void {
        const token = g.token.load(.acquire) orelse return;
        io.vtable.groupCancel(io.userdata, g, token);
        assert(g.token.raw == null);
    }