Add ack message for worklet death; remove max pool size

This commit is contained in:
Aria 2026-01-12 13:51:21 -06:00
parent 753dc48b69
commit 7c5f53f9ae
4 changed files with 34 additions and 9 deletions

View file

@ -252,7 +252,10 @@ export async function onTriggerSynth(t, value, onended, tables, cps, frameLen) {
});
source.port.postMessage({ type: 'initialize', payload });
source.port.onmessage = (e) => {
if (e.data.type === 'died') markWorkletAsDead(source);
if (e.data.type === 'died') {
markWorkletAsDead(source);
source.port.postMessage({ type: 'diedACK' });
}
source.port.onmessage = null;
};
if (ac.currentTime > t) {