pub struct WarmUp { /* private fields */ }Expand description
A held place in the queue to fill a cold cache.
Obtained from WarmUp::begin and given up with WarmUp::finish
once the kernels are compiled. Dropping one without calling finish
releases the lock without leaving a stamp, so a run that failed part
way through does not convince the next process that the cache is
warm.
Implementations§
Source§impl WarmUp
impl WarmUp
Sourcepub fn begin(key: u128) -> Option<WarmUp>
pub fn begin(key: u128) -> Option<WarmUp>
Takes a place in the queue for the kernels key identifies.
Returns Some while holding the lock, and the caller compiles
under it. Returns None when there is nothing to wait for, which
covers a cache that is already warm for these kernels, a cache
that is turned off, and a lock that could not be taken in
[WAIT_LIMIT]. In every one of those the caller carries on and
compiles as it always did.
Blocks for as long as the process ahead takes to compile, so it belongs on the path that builds a denoiser rather than on the path that renders a frame.