ManifoldCAD User Guide
    Preparing search index...

    Interface ExecutionContext

    Observe and control a long-running Manifold evaluation. Attach to a Manifold via Manifold.withContext(); the next eager op invoked on the result (status(), one of the refine* family, hull(), or minkowskiSum() / minkowskiDifference()) snapshots the ctx and reports progress / observes cancellation through it. Deferred ops (Boolean, transforms, batch ops) ignore any attached ctx. Safe to read/write from any thread/worker.

    Cancellation is permanent for a Manifold: once cancelled and detected, the Manifold's status becomes 'Cancelled' and stays 'Cancelled'.

    interface ExecutionContext {
        cancel(): void;
        cancelled(): boolean;
        delete(): void;
        progress(): number;
    }
    Index

    Basics

    • Frees the WASM memory of this ExecutionContext, since these cannot be garbage-collected automatically.

      Returns void

    Methods

    • Request cancellation. Can be called from any context. Idempotent.

      Returns void

    • Has cancellation been requested?

      Returns boolean

    • Normalized progress in [0, 1]. Monotonic within an evaluation. Returns 1 when no work has been scheduled (interpreted as trivially complete -- e.g. a single-leaf manifold has nothing to evaluate).

      Returns number