Skip to content

Worklet agents and the event loop #10136

@annevk

Description

@annevk

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----

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions