pub const InitOptions = struct stack_size: usize = std.Thread.SpawnConfig.default_stack_sizeAffects how many bytes are memory-mapped for threads.
async_limit: ?Io.Limit = nullMaximum thread pool size (excluding main thread) when dispatching async tasks. Until this limit, calls to Io.async when all threads are busy will cause a new thread to be spawned and permanently added to the pool. After this limit, calls to Io.async when all threads are busy run the task immediately.
Defaults to one less than the number of logical CPU cores.
Protected by Threaded.mutex once the I/O instance is already in use. See setAsyncLimit.
concurrent_limit: Io.Limit = .unlimitedMaximum thread pool size (excluding main thread) for dispatching concurrent tasks. Until this limit, calls to Io.concurrent will increase the thread pool size.
After this number, calls to Io.concurrent return error.ConcurrencyUnavailable.
argv0: Argv0 = .emptyAffects the following operations:
processExecutablePath on OpenBSD and Haiku.environ: process.Environ = .emptyAffects the following operations:
fileIsTtyprocessExecutablePath on OpenBSD and Haiku (observes "PATH").processSpawn, processSpawnPath, processReplace, processReplacePathdisable_memory_mapping: bool = falseIf set to true, File.MemoryMap APIs will always take the fallback path.
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605pub const InitOptions = struct {
/// Affects how many bytes are memory-mapped for threads.
stack_size: usize = std.Thread.SpawnConfig.default_stack_size,
/// Maximum thread pool size (excluding main thread) when dispatching async
/// tasks. Until this limit, calls to `Io.async` when all threads are busy will
/// cause a new thread to be spawned and permanently added to the pool. After
/// this limit, calls to `Io.async` when all threads are busy run the task
/// immediately.
///
/// Defaults to one less than the number of logical CPU cores.
///
/// Protected by `Threaded.mutex` once the I/O instance is already in use. See
/// `setAsyncLimit`.
async_limit: ?Io.Limit = null,
/// Maximum thread pool size (excluding main thread) for dispatching concurrent
/// tasks. Until this limit, calls to `Io.concurrent` will increase the thread
/// pool size.
///
/// After this number, calls to `Io.concurrent` return `error.ConcurrencyUnavailable`.
concurrent_limit: Io.Limit = .unlimited,
/// Affects the following operations:
/// * `processExecutablePath` on OpenBSD and Haiku.
argv0: Argv0 = .empty,
/// Affects the following operations:
/// * `fileIsTty`
/// * `processExecutablePath` on OpenBSD and Haiku (observes "PATH").
/// * `processSpawn`, `processSpawnPath`, `processReplace`, `processReplacePath`
environ: process.Environ = .empty,
/// If set to `true`, `File.MemoryMap` APIs will always take the fallback path.
disable_memory_mapping: bool = false,
}