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

Only microtasks, but still postMessage()? #319

Closed
annevk opened this issue Sep 30, 2016 · 9 comments
Closed

Only microtasks, but still postMessage()? #319

annevk opened this issue Sep 30, 2016 · 9 comments

Comments

@annevk
Copy link
Member

annevk commented Sep 30, 2016

It seems some worklets want a postMessage() API, but how does that work without tasks? I couldn't find a definition anywhere.

@tabatkins
Copy link
Member

Worklets definitely aren't getting postMessage. Some sort of signaling back to the main thread is needed by some worklets, but we've yet to work out the details.

(This was discussed at TPAC - AudioWorklet eventually needs this comm mechanism, but doesn't desperately need it right now; some people were worried about Process, tho, and wanted to shoehorn something in early.)

@bfgeek
Copy link
Contributor

bfgeek commented Apr 5, 2017

So I'll close this for now, the webaudio folks have moved away from a postMessage api and all of the baggage that contains for a far more constrained sendData method, and ondata callback which just works on structured cloning the given data. ondata works the same as other worklet callbacks and called right before the process callback is invoked. (rather than triggered by the event loop).

@bfgeek bfgeek closed this as completed Apr 5, 2017
@bfgeek
Copy link
Contributor

bfgeek commented Apr 5, 2017

/cc @hoch FYI

@annevk
Copy link
Member Author

annevk commented Apr 5, 2017

ondata is an event or a callback? That would have to be a microtask somehow per the not super precise description of worklets event loop?

@annevk
Copy link
Member Author

annevk commented Apr 5, 2017

I looked at https://webaudio.github.io/web-audio-api/ btw and sendData() is far from defined. There's no processing algorithm whatsoever.

@annevk
Copy link
Member Author

annevk commented Apr 5, 2017

(I also found WebAudio/web-audio-api#1193.)

@bfgeek
Copy link
Contributor

bfgeek commented Apr 5, 2017

Filed WebAudio/web-audio-api#1194 regarding it being currently a EventHandler when it should just be a callback which is invoked by the UA.

@hoch
Copy link

hoch commented Apr 5, 2017

Thanks for pointing them out. Those were the last bit of loose ends in the AudioWorklet spec. I posted follow up questions on the issue.

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

6 participants