Skip to main content

Module base

Module base 

Source
Expand description

The pool of backend streams, and the primitives that record on their memory what a unit of work did or did not write.

The pool answers one question — which stream sits in a slot — and the free functions below answer the other: which stream allocated a binding, so the claim lands on the memory rather than on whoever failed. They are free because the pool and the failure graph are held apart by every caller; the surface a driver actually uses is FailureStore.

Structs§

ReadFailure
What a launch’s read-set check found: the failure claiming an input, the input it claims, and the error — everything the skip needs to record and a capture needs to fail with.
StreamPool
Represents a pool of streams, managing a collection of streams created by a factory.

Traits§

StreamFactory
Trait for creating streams, used by the stream pool to generate streams as needed.
StreamMemory
The memory a stream’s kernels see, for the taint bookkeeping.

Functions§

stream_index
Maps a stream ID to an index within the pool’s capacity using modulo arithmetic.
taint
taint_with under a failure minted for error, dropped again when it claimed nothing: a failure no buffer still holds has nothing to wait for.
taint_with
Point the bytes every binding in written names at failure.
written
Release the failure on every allocation in written: work that writes them has been enqueued, so a read of one is no longer reading bytes nothing wrote.