fn Stack(comptime T: type) type

Many reader, many writer, non-allocating, thread-safe Uses a spinlock to protect push() and pop() When building in single threaded mode, this is a simple linked list.

Parameters

T: type,

Fields

root: ?*Node,
lock: @TypeOf(lock_init),

Types

Functions

fn init() Self

No documentation provided.

fn isEmpty(self: *Self) bool

No documentation provided.

fn pop(self: *Self) ?*Node

No documentation provided.

fn push(self: *Self, node: *Node) void

No documentation provided.

fn pushFirst(self: *Self, node: *Node) ?*Node

push operation, but only if you are the first item in the stack. if you did not …

push operation, but only if you are the first item in the stack. if you did not succeed in being the first item in the stack, returns the other item that was there.

Values

Self
type