package core:container/pool

⌘K
Ctrl+K
or
/

    Index

    Types (2)
    Constants (1)
    Variables (0)

    This section is empty.

    Procedure Groups (0)

    This section is empty.

    Types

    Pool ¶

    Pool :: struct($T: typeid) {
    	… // See source for fields
    }
     

    A thread-safe (between init and destroy) object pool backed by virtual growing arena returning stable pointers. The element type requires an intrusive link node.

    Example:
    Elem :: struct {
    	link: ^Elem,
    }
    
    p: pool.Pool(Elem)
    pool.init(&p, "link")
    
    Related Procedures With Parameters

    Pool_Arena ¶

    Pool_Arena :: mem_virtual.Arena

    Constants

    DEFAULT_BLOCK_SIZE ¶

    DEFAULT_BLOCK_SIZE: int : _DEFAULT_BLOCK_SIZE

    Variables

    This section is empty.

    Procedures

    cap ¶

    cap :: proc(p: ^Pool($T)) -> int {…}

    destroy ¶

    destroy :: proc(p: ^Pool($T)) {…}

    get ¶

    get :: proc(p: ^Pool($T)) -> (elem: ^$T, err: runtime.Allocator_Error) #optional_ok {…}

    init ¶

    init :: proc(p: ^Pool($T), $link_field: string, block_size: uint = DEFAULT_BLOCK_SIZE) -> (err: runtime.Allocator_Error) {…}

    num_outstanding ¶

    num_outstanding :: proc(p: ^Pool($T)) -> int {…}

    num_ready ¶

    num_ready :: proc(p: ^Pool($T)) -> int {…}

    put ¶

    put :: proc(p: ^Pool($T), elem: ^$T) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2026-01 (vendor "odin") Windows_amd64 @ 2026-01-16 21:14:58.831962200 +0000 UTC