Skip to content

v.wait()

Use v.wait() when JavaScript must wait until GPU work is finished.

await v.wait(node);

It submits work just like v.run(), then waits for completion.

v.wait() also accepts an array.

await v.wait([A, B]);

This is the waiting version of v.run([A, B]).

Use v.wait() when:

  • measuring GPU work
  • coordinating with code that must run after the GPU is done
  • debugging execution order

You do not need v.wait() before v.read(). Reading data already waits for the readback it needs.