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

await

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

Blocks until all tasks of the group finish. During this time, cancelation requests propagate to all members of the group, and will also cause error.Canceled to be returned when the group does ultimately finish.

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

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

Errors

Canceled

Caller has requested the async operation to stop.

File

Io.zig:1402
1402
1403
1404
1405
1406
    pub fn await(g: *Group, io: Io) Cancelable!void {
        const token = g.token.load(.acquire) orelse return;
        try io.vtable.groupAwait(io.userdata, g, token);
        assert(g.token.raw == null);
    }