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 › LookupDnsWindows › completed Private Function completed Doc Source Private Function std.Io.Threaded.LookupDnsWindows.completed
fn completed (
pQueryContext : ?*anyopaque ,
pQueryResults : *windows .DNS .QUERY .RESULT ,
) callconv (.winapi ) void Params pQueryContext : ?*anyopaque pQueryResults : *windows .DNS .QUERY .RESULT File Io/Threaded.zig: 14983
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995 fn completed (
pQueryContext : ?*anyopaque ,
pQueryResults : *windows .DNS .QUERY .RESULT ,
) callconv (.winapi ) void {
_ = pQueryContext ;
const lookup_dns : *LookupDnsWindows = @fieldParentPtr ("results" , pQueryResults );
lookup_dns .completedFallible () catch |err | switch (err ) {
error .Closed => unreachable , // `resolved` must not be closed until `netLookup` returns
error .Canceled => unreachable , // called from an uncancelable thread
};
@atomicStore (bool , &lookup_dns .done , true , .release );
_ = windows .ntdll .NtAlertThread (lookup_dns .thread );
}