Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[worklets] Post-resolution tasks for addModule() call #418

Open
hoch opened this issue Jun 23, 2017 · 1 comment
Open

[worklets] Post-resolution tasks for addModule() call #418

hoch opened this issue Jun 23, 2017 · 1 comment

Comments

@hoch
Copy link

hoch commented Jun 23, 2017

In AudioWorklet, we (AudioWG) are going to have this step when the addModule() call gets resolved:

... this internal storage is populated from node name to processor definition map by extracting a node name and the matching value from parameterDescriptors when a promise from addModule() on the Worklet gets resolved.

The step should happen on the main thread, mainly to keep a "thread-specific" copy of necessary information for the construction of worklet-related objects. It is valid to have multiple WorkletGlobalScopes with AudioWorklet, so this post-resolution step is useful when synchronizing all instances of WorkletGlobalScopes and associated main thread proxy objects (e.g. BaseAudioContext).

I believe having the spec text that describes this step would be actually clear and useful. Is this something planned? If not, what's the best path to introduce this?

@joeberkovitz
Copy link

Another related approach would be to specify that all actions performed in a WorkletGlobalScope that are "queued to the main thread" are performed before the resolution of the addModule() promise (which itself can be seen as a queued task that only gets its turn after these actions complete).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants