WICG / storage-foundation-api-explainer

Explainer showcasing a new web storage API, NativeIO
Apache License 2.0
63 stars 8 forks source link

multi-threaded applications #31

Open hcldan opened 3 years ago

hcldan commented 3 years ago

Trying to use the example in a multithreaded environment and running into this, I think: https://github.com/emscripten-core/emscripten/issues/13519

Anyone have any ideas?

hcldan commented 3 years ago

So it looks like FS is intended to be run on the main browser thread. I guess it works for the same application if it's not multithreaded and made to run in a web worker... but when you use pthreads, FS is expected to be in the browser thread, as there are numerous syscalls that end up getting proxied there.

Which means the same SF provider doesn't work, because the sync apis are not exposed in the browser main thread...

hcldan commented 2 years ago

I figured I would cross post this here in case there is anyone interested from an emscripten pov https://github.com/emscripten-core/emscripten/issues/15041#issuecomment-923084879