From 8cf7d22635b4560618b40ba70bac2ceab3b55c14 Mon Sep 17 00:00:00 2001 From: Austin Sullivan Date: Tue, 24 Jan 2023 10:34:36 -0500 Subject: [PATCH] Synchronously release lock in FileSystemSyncAccessHandle's close() Fixes #83. --- index.bs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 9bd1ac7..1a99ef1 100644 --- a/index.bs +++ b/index.bs @@ -1238,14 +1238,19 @@ The flush() method steps are:
: |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|.
-The close() method steps are -to set [=this=].[=[[state]]=] to "`closed`". +The close() 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