Selva Compute API Reference - v1.5.1
    Preparing search index...

    Class SolveScheduler

    Robust scheduler for Grasshopper solves.

    Sits between your application code and the underlying compute call, adding:

    • Configurable scheduling (latest-wins for sliders, queue for jobs)
    • In-flight cancellation (per-call signal + cancelAll)
    • Optional response caching for repeated inputs
    • Lifecycle hooks for UI indicators (start / settle / superseded)
    • State observability via subscribe()

    Multiple schedulers can share a single GrasshopperClient — typically one per UI surface (e.g. one for slider scrubs, one for long-running submits).

    const scheduler = client.createScheduler({ mode: 'latest-wins', timeoutMs: 30_000 });

    // From a slider handler:
    scheduler.solve(definition, tree).then((result) => {
    updateMeshes(result);
    }).catch((err) => {
    if (err.code !== 'SUPERSEDED') showError(err);
    });

    // From a UI binding:
    scheduler.subscribe(() => {
    showSpinner = scheduler.isSolving;
    });
    Index

    Constructors

    Accessors

    Methods