pub trait DeferredReleaseQueue:
Send
+ Sync
+ Debug {
// Required method
fn enqueue(
&self,
request: PreparedAllocationRelease,
) -> Result<(), DeferredEnqueueError>;
// Provided method
fn pending(&self) -> usize { ... }
}Expand description
A provider/context-owned sink for final allocation ownership.
The queue is not owned by this crate. A CUDA provider owns one per context
or per stream, records a fence when a request arrives, and calls
PreparedAllocationRelease::execute once that fence is observed.
§Contract
enqueueis always called with no registry lock and no mechanism lock held, so an implementation may take its own locks freely.enqueuemust not block on the device.- On refusal, the implementation must return the exact request inside
DeferredEnqueueError. It must never drop the request silently to signal failure; dropping it is defined as quarantine, not as free.
Required Methods§
Sourcefn enqueue(
&self,
request: PreparedAllocationRelease,
) -> Result<(), DeferredEnqueueError>
fn enqueue( &self, request: PreparedAllocationRelease, ) -> Result<(), DeferredEnqueueError>
Take final ownership of request.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".