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 › init_single_threaded Public Constant init_single_threaded Doc Source Public Constant std.Io.Threaded.init_single_threaded
pub const init_single_threaded : Threaded = init : File Io/Threaded.zig: 1676
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693 pub const init_single_threaded : Threaded = init : {
const env_block : process .Environ .Block = if (is_windows ) .global else .empty ;
break :init .{
.allocator = .failing ,
.stack_size = std .Thread .SpawnConfig .default_stack_size ,
.async_limit = .nothing ,
.cpu_count_error = null ,
.concurrent_limit = .nothing ,
.old_sig_io = undefined ,
.old_sig_pipe = undefined ,
.have_signal_handler = false ,
.argv0 = .empty ,
.environ_initialized = env_block .isEmpty (),
.environ = .{ .process_environ = .{ .block = env_block } },
.worker_threads = .init (null ),
.disable_memory_mapping = false ,
};
}
Statically initialize such that calls to
Io.VTable.concurrentwill fail witherror.ConcurrencyUnavailable.When initialized this way:
deinitis safe, but unnecessary to call.