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

Plan for enabling high-resolution timers #1261

Open
annevk opened this issue Jan 31, 2019 · 4 comments
Open

Plan for enabling high-resolution timers #1261

annevk opened this issue Jan 31, 2019 · 4 comments
Labels

Comments

@annevk
Copy link
Member

annevk commented Jan 31, 2019

In tc39/ecma262#1435 I detailed an approach the HTML community is planning on taking for reenabling ECMAScript's SharedArrayBuffer. This also affects Wasm if Wasm ever gets its own thread primitive (rather than building on top of workers and postMessage()) or some other high-resolution timer mechanism. Your input is most welcome.

cc @arturjanc @cdumez @csreis @linclark @lukewagner @mystor @rniwa

@littledan
Copy link

littledan commented Feb 5, 2019

For Wasm threads, see https://github.com/WebAssembly/threads , cc @binji. Should this issue be filed there? Maybe the threads Web API should tie into this plan.

@annevk
Copy link
Member Author

annevk commented Feb 5, 2019

To be clear, that is the plan. It should fall out automatically given eventual HTML integration is as I understand it, since postMessage() is the underlying primitive for Wasm too.

I filed WebAssembly/threads#124 to spread this message there too.

(If Wasm eventually gets "actual" threads those would only be allowed if this new agent cluster flag is set, but it seems those are still far away.)

@annevk
Copy link
Member Author

annevk commented Jul 9, 2019

In web-platform-tests/wpt#17690 I'm looking at updating tests to account for this new design. I don't think it affects any existing wasm/ tests as the once I encountered specify jsshell as the global, which isn't a standardized thing per se.

@annevk
Copy link
Member Author

annevk commented Jul 8, 2020

The HTML Standard now fully defines this. Firefox 79 implements it (shipping later this month). Chrome will migrate to it. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes is still a useful high-level summary.

Feel free to close this.

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

No branches or pull requests

3 participants