silk.build.execution.
Deferred storage for a build step's work, using the ordinary fiber execution boundary.
Construction packages the work without running it. The graph runner supplies its resolved context when the dependencies are complete, then drives the work on a worker fiber.
Import as Pending with import silk.build.execution { Pending }.
Public declarations: 2.
Work#
pub interface Work<C, A, E>Owned work whose resolved context is supplied only when the graph runs it.
Operation perform#
effect fn perform(self: Self, context: C) -> A ! ERuns once after all declared inputs have been resolved.
Pending#
pub struct Pending<C, A, E>A dormant step with one execution and no resolved inputs yet.
Implementation Pending<C, A, E>#
impl<C: Transferable + 'static, A: Transferable + 'static, E: Transferable + 'static> Pending<C, A, E>Associated function make#
pub effect fn make<T: Work<C, A, E> + Transferable + 'static>(work: T) -> Self
! OutOfMemoryError ? &mut AllocatorPackages owned work without calling it. Allocation failure runs no work.
Method execute#
pub effect fn execute(self: Self, context: C) -> A ! ESupplies the resolved inputs and drives the work to completion, preserving typed failures. A parked step resumes only after its execution's readiness notification.
Method finish#
pub effect fn finish(self: Self, context: C) -> A ! ESupplies the resolved inputs and drives work that blocks instead of parking to completion on the calling thread, so a caller without a scheduler can run it.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.