Expand description
proxima_primitives::sync::task — runtime-agnostic task primitives shaped like
tokio::task. Folded from the former proxima-task crate (Workstream
F, RISC-dedup) so other proxima leaf crates (proxima-middleware,
proxima-listeners-*, prime, etc.) reach it via the same crate as the
rest of proxima’s concurrency surface, without circling back through
the top-level proxima crate.
Surface:
yield_now— cooperative scheduling hook. Pure re-export offutures::task::yield_now; runtime-agnostic.JoinSet— underruntime-tokio, a thin newtype overtokio::task::JoinSet. Without it (the default, tokio-free build), a portable backing: one OS thread per spawned task runningfutures::executor::block_on, with completions delivered through an mpsc channel +Notifysojoin_nextstays a non-blocking.await. Real independent background progress without depending on the caller’s async runtime — the same functional contract as tokio’sJoinSet, minus true task abortion (an OS thread can’t be forcibly stopped;abort_allstops waiting on outstanding tasks instead).
Structs§
- Abort
Handle - No-op marker kept for call-site parity with
tokio::task::AbortHandle— an OS thread cannot be forcibly stopped from the outside. - Join
Error - Mirrors
tokio::task::JoinError’s query surface — the only partProducerLifecyclereads. - JoinSet
- Tokio-free task set. See module docs for the execution model.
- Yield
Now - Future returned by
yield_now. Named so callers can store it.
Functions§
- yield_
now - Cooperative yield. The returned future yields exactly once on
first poll (
Pending+ waker-poke), then resolves on the next poll. Same semantic astokio::task::yield_now, runtime-agnostic.