Skip to content

Commit

Permalink
Run batchFinishedCallback on processBatch to catch unhandled rejectio…
Browse files Browse the repository at this point in the history
…ns by test functions (#3844)
  • Loading branch information
sagudev authored Jul 15, 2024
1 parent c623e2b commit 20425f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webgpu/shader/execution/expression/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export async function run(
};
const checkBatch = await submitBatch(t, shaderBuilder, shaderBuilderParams, pipelineCache);
checkBatch();
void t.queue.onSubmittedWorkDone().finally(batchFinishedCallback);
await t.queue.onSubmittedWorkDone();
};

const pendingBatches = [];
Expand All @@ -430,7 +430,7 @@ export async function run(
}
batchesInFlight += 1;

pendingBatches.push(processBatch(batchCases));
pendingBatches.push(processBatch(batchCases).finally(batchFinishedCallback));
}

await Promise.all(pendingBatches);
Expand Down

0 comments on commit 20425f6

Please sign in to comment.