emscripten-core / emscripten-core/emscripten
Storage Foundation emscripten filesystem for multi-threaded apps not working
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Re: the experimental https://github.com/fivedots/storage-foundation-api-emscripten-fs. I found the example app works.
But, when I try to use in my multi-threaded wasm app, the filesystem calls proxy to the main thread, and then attempt to use `openSync` and `getAllSync` which are only available from a Web Worker.
I believe this is because `getAllSync` is invoked from `lookup()`, which is invoked by calls like `___sys_stat64`. And, those calls are marked to use the proxy mechanism. The first thing that `___sys_stat64` does is to proxy to the main thread.
The problem seems a bit tricky. Calls like `__sys_stat64` do need to proxy for some posix calls. But, not for nativeio.
Contributor guide
Assessment
This issue has not been assessed yet.