Skip to content

Commit 8cf7d22

Browse files
authored
Synchronously release lock in FileSystemSyncAccessHandle's close()
Fixes #83.
1 parent 2b0a522 commit 8cf7d22

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

index.bs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,14 +1238,19 @@ The <dfn method for=FileSystemSyncAccessHandle>flush()</dfn> method steps are:
12381238

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

12461247
<div algorithm>
1247-
The <dfn method for=FileSystemSyncAccessHandle>close()</dfn> method steps are
1248-
to set [=this=].[=[[state]]=] to "`closed`".
1248+
The <dfn method for=FileSystemSyncAccessHandle>close()</dfn> method steps are:
1249+
1250+
1. If [=this=]'s [=[[state]]=] is "`closed`", return.
1251+
1. Set [=this=]'s [=[[state]]=] to "`closed`".
1252+
1. [=file entry/lock/release|Release the lock=] on
1253+
[=this=]'s [=FileSystemSyncAccessHandle/[[file]]=].
12491254

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

0 commit comments

Comments
 (0)