Skip to main content

Module work_pool

Module work_pool 

Source

Re-exports§

pub use crate::thread_pool::Batch;
pub use crate::thread_pool::Task;

Structs§

WorkPool

Traits§

IntrusiveWorkTask
A type that embeds an intrusive task: Task field. Declares the byte offset of that field once and provides the canonical container-of recovery used by every fn(task: *mut Task) thread-pool trampoline (the Rust equivalent of Zig’s per-site @fieldParentPtr("task", task)).
OwnedTask
An IntrusiveWorkTask that the WorkPool takes ownership of by value (Box<Self>). WorkPool::schedule_owned performs the Box → raw-pointer hand-off and __callback recovers Box<Self> via IntrusiveWorkTask::from_task_ptr, so call sites never touch Box::into_raw/from_raw directly.