MCPcopy Create free account
hub / github.com/dawn-gpu/node-webgpu / run

Function run

test/tests/worker-threads-tests.js:37–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35} else {
36 // Worker code
37 async function run() {
38 const { create } = await import('../../index.js');
39 const gpu = create([]);
40 const adapter = await gpu.requestAdapter();
41 if (adapter) {
42 parentPort.postMessage('success');
43 } else {
44 parentPort.postMessage('failure');
45 }
46 }
47 run().catch(err => {
48 parentPort.postMessage(err.message || String(err));
49 process.exit(1);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected