WebGPU module

webgpu_wait

procedureextensionexperimentalSource

Processes events until done is set by a callback created with mode .AllowProcessEvents or .AllowSpontaneous. Natively it polls wgpu-native and sleeps a little once the wait gets long; in the browser each poll lets the page run.

Example↗
instance := wgpuCreateInstance(null);
done := false;
// ... start something whose callback sets `done` ...
webgpu_wait(instance, *done);

This one is only checked to compile, not run.

webgpu_wait :: (instance: WGPUInstance, done: *bool)

Parameters

instance: WGPUInstance
done: *bool

See also