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

Async loading #19

Open
hrj opened this issue Jun 10, 2016 · 2 comments
Open

Async loading #19

hrj opened this issue Jun 10, 2016 · 2 comments

Comments

@hrj
Copy link
Member

hrj commented Jun 10, 2016

(start decoding while the bytes are still being fetched from the network)

@hrj
Copy link
Member Author

hrj commented Apr 27, 2017

Good discussion / ideas about synchronisation in web-workers:
http://stackoverflow.com/questions/43038023/obtain-data-synchronously-from-webworker

To summarize:

  • One could use a polling loop to read data from local-storage, but this will spin the CPU.
  • In future, SharedArrayBuffer will help. It is supported in Firefox and Safari now, but not yet standardized, nor available in other browsers. Edit: Atomics.wait seems especially useful.

@hrj
Copy link
Member Author

hrj commented Jan 30, 2018

Update:

Atomics.wait was gaining support in major browsers. However, recently, the support has been disabled by most browsers to reduce the efficacy of side-channel attacks. So we are back to where we were, until the support is re-enabled.

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

1 participant