Open hrj opened 8 years ago
Good discussion / ideas about synchronisation in web-workers: http://stackoverflow.com/questions/43038023/obtain-data-synchronously-from-webworker
To summarize:
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. 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.
(start decoding while the bytes are still being fetched from the network)