Expand description
Keeping a provider/context alive across an outstanding deferred release.
A deferred release is a promise that someone will free device memory later. Whoever performs that free needs the provider/context it was allocated against to still exist: a stream-ordered free retiring after its CUDA context has been torn down unmaps handles the teardown already released, which is undefined behaviour at the driver level rather than a Rust error.
The host side of a plugin boundary cannot depend on the governor, so the
pin is expressed here as two object-safe traits. The governor implements
them over its provider-context records; a mechanism holds
ProviderContextPin values and knows nothing about how the pin is
counted.
The direction of the guarantee matters. A pin does not ask a context to stay alive; it makes teardown observe the outstanding work. Acquiring a pin against a context that is already retiring must fail rather than succeed, because a release that cannot be pinned is a release that must not be queued.
Enums§
- Provider
Context PinError - Why a provider/context pin could not be acquired.
Traits§
- Provider
Context Pin - A live claim on a provider/context.
- Provider
Context PinSource - Something that can hand out
ProviderContextPins for one context.