Skip to content

Commit

Permalink
Synchronously release lock in FileSystemSyncAccessHandle's close()
Browse files Browse the repository at this point in the history
Fixes whatwg#83.
  • Loading branch information
a-sully authored Jan 24, 2023
1 parent 2b0a522 commit 8cf7d22
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,14 +1238,19 @@ The <dfn method for=FileSystemSyncAccessHandle>flush()</dfn> method steps are:

<div class="note domintro">
: |handle| . {{FileSystemSyncAccessHandle/close()}}
:: Closes the access handle. This disables any further operations on it and
:: Closes the access handle or no-ops if the access handle is already closed.
This disables any further operations on it and
[=file entry/lock/release|releases the lock=] on the
[=FileSystemHandle/entry=] associated with |handle|.
</div>

<div algorithm>
The <dfn method for=FileSystemSyncAccessHandle>close()</dfn> method steps are
to set [=this=].[=[[state]]=] to "`closed`".
The <dfn method for=FileSystemSyncAccessHandle>close()</dfn> method steps are:

1. If [=this=]'s [=[[state]]=] is "`closed`", return.
1. Set [=this=]'s [=[[state]]=] to "`closed`".
1. [=file entry/lock/release|Release the lock=] on
[=this=]'s [=FileSystemSyncAccessHandle/[[file]]=].

Note: This method does not guarantee that all file modifications will be
immediately reflected in the underlying storage device. Call the
Expand Down

0 comments on commit 8cf7d22

Please sign in to comment.