Worklet agents and the event loop #10136
Labels
integration
Better coordination across standards needed
topic: agent
The interaction with JavaScript's agent and agent cluster concepts
topic: event loop
topic: worklets
As @mhofman discovered in tc39/proposal-shadowrealm#398 (comment) there's something broken about the current setup. Agents are assumed to be 1:1 with an event loop, but we don't define an event loop for worklets (as we don't want them to have one). However, this means that certain features such as
FinalizationRegistry
effectively crash (see HostEnqueueFinalizationRegistryCleanupJob(finalizationRegistry)).I think this means we either need to have non-event-loop agents that don't expose these features or we need to give worklets a minimal event loop. I think the latter is very much undesirable for good audio, but I'll defer to @padenot on that.
cc @syg @padenot @domenic @rniwa @smaug----
The text was updated successfully, but these errors were encountered: