@pbroom/color-kit/computeScheduling

runScheduledPlaneCompute

Runs a batch of plane queries through a scheduler, which records timing telemetry and adds routing details to the response.

functionimport { runScheduledPlaneCompute } from '@pbroom/color-kit/compute';index.ts:146
function runScheduledPlaneCompute(
  request: PlaneComputeRequest,
  scheduler?: PlaneComputeScheduler,
): PlaneComputeResponse;

Parameters

requestPlaneComputeRequest
Plane, queries, hints and optional trace options.
scheduler?PlaneComputeScheduler
Scheduler to use. Defaults to a shared scheduler (created on first use) whose telemetry getDefaultPlaneComputeTelemetrySnapshot reads.

Returns

PlaneComputeResponseThe response, including schedule.

Example

TypeScript
import { runScheduledPlaneCompute } from '@pbroom/color-kit/compute';

const response = runScheduledPlaneCompute({
  plane: { model: 'oklch', fixed: { h: 250 } },
  queries: [{ kind: 'gamutRegion', gamut: 'srgb' }],
});

response.schedule?.selectedBackend; // → 'js'
response.schedule?.reason; // → 'default-js'

See also