Skip to content

Commit bd6ef5a

Browse files
nathanmemmottNathan Memmott
and
Nathan Memmott
authored
Meta: Add "readwrite-unsafe" example to MultipleReadersWriters proposal
Updates explainer introduction so that "readwrite-unsafe" is included in the example. Co-authored-by: Nathan Memmott <[email protected]>
1 parent dd99f3a commit bd6ef5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

proposals/MultipleReadersWriters.md

+4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
Currently, only one instance of [FileSystemSyncAccessHandle](https://fs.spec.whatwg.org/#api-filesystemsyncaccesshandle) may be open at a time, given a [file system entry](https://fs.spec.whatwg.org/#entry). This explainer proposes a new locking scheme and API changes to support multiple readers and writers for `FileSystemSyncAccessHandle` and an exclusive writer for `FileSystemWritableFileStream`.
1515

16+
Introducing new locking modes for [FileSystemSyncAccessHandle](https://fs.spec.whatwg.org/#api-filesystemsyncaccesshandle) and [FileSystemWritableFileStream](https://fs.spec.whatwg.org/#api-filesystemwritablefilestream) allows opening either multiple readers/writers or an exclusive writer to a file entry, depending on the application's use case.
17+
1618
```
1719
handle.createSyncAccessHandle({ mode: 'read-only' });
20+
handle.createSyncAccessHandle({ mode: 'readwrite-unsafe' });
21+
1822
handle.createWritable({ mode: 'exclusive' });
1923
```
2024

0 commit comments

Comments
 (0)