std.Thread.CpuCountError
- Kind
- error set
- Module
std.Thread
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.Thread in the Zig reference. This page has 21 cards.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn detach(self: Thread) void
Release the obligation of the caller to call `join()` and have the thread clean up its own resources on completion.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getCpuCount() CpuCountError!usize
Returns the platforms view on the number of logical CPU cores available.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getCurrentId() Id
Returns the platform ID of the callers thread.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getHandle(self: Thread) Handle
Returns the handle of this thread.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]const u8
On Windows, the result is encoded as [WTF-8](https://wtf-8.codeberg.page/).
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Represents a kernel thread handle.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Represents an ID per thread guaranteed to be unique only within a process.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn join(self: Thread) void
Waits for the thread to complete, then deallocates any resources created on `spawn()`.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn maybeAttachSignalStack() void
Configures the per-thread alternative signal stack requested by `std.options.signal_stack_size`.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn setName(self: Thread, io: Io, name: []const u8) SetNameError!void
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn spawn(config: SpawnConfig, comptime function: anytype, args: anytype) SpawnError!Thread
Spawns a new thread which executes `function` using `args` and returns a handle to the spawned thread. `config` can be used as hints to the platform for how to spawn and execute the `function`.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Configuration options for hints on how to spawn threads.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn yield() YieldError!void
Yields the current thread potentially allowing other threads to run.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.ThreadSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.