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

WasmFS: Use "readwrite-unsafe" in OPFS backend #21869

Open
tlively opened this issue Apr 30, 2024 · 0 comments
Open

WasmFS: Use "readwrite-unsafe" in OPFS backend #21869

tlively opened this issue Apr 30, 2024 · 0 comments

Comments

@tlively
Copy link
Member

tlively commented Apr 30, 2024

Currently the OPFS backend for WasmFS only uses SyncAccessHandles when files are opened for reading and writing. The reason we don't use SyncAccessHandles for read-only files is to support the use case of opening a file for reading from multiple tabs simultaneously; SyncAccessHandles acquire a file lock that allows a file to be opened by only a single agent at at time. However, there is a new "readwrite-unsafe" option that can be used with SyncAccessHandles that would allow them to be opened from multiple tabs. When this option is available, we should always use it no matter what mode the file is opened in.

https://developer.chrome.com/blog/new-dev-trial-for-multiple-readers-and-writers/

@tlively tlively added the wasmfs label Apr 30, 2024
@tlively tlively added this to the WasmFS new features milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant