filename -> file-name.
This commit is contained in:
parent
6ad3e27d16
commit
737917e695
|
@ -61,16 +61,16 @@ Section \ref{sec:filelocking} already points out that {\Posix}'s file
|
|||
locks are almost useless in practice. To bypass this restriction other
|
||||
advisory locking mechanisms, based only on standard file operations,
|
||||
where invented. One of them is the so-called \emph{dot-locking} scheme
|
||||
where the lock of \textit{filename} is represented by the file
|
||||
\textit{filename}\texttt{.lock}. Care is taken that only one process
|
||||
where the lock of \textit{file-name} is represented by the file
|
||||
\textit{file-name}\texttt{.lock}. Care is taken that only one process
|
||||
may generate the lock for a given file.
|
||||
|
||||
Here is scsh's interface to dot-locking:
|
||||
|
||||
\defun {obtain-dot-lock} {filename [interval retry-number stale-time]} {\boolean}
|
||||
\defun {obtain-dot-lock} {file-name [interval retry-number stale-time]} {\boolean}
|
||||
|
||||
\begin{desc}
|
||||
Tries to obtain the lock for \var{filename}. If the file is already
|
||||
Tries to obtain the lock for \var{file-name}. If the file is already
|
||||
locked, the thread sleeps for \var{interval} seconds (default is 1)
|
||||
before it retries. If the lock cannot be obtained after
|
||||
\var{retry-number} attempts, the procedure returns \sharpf,
|
||||
|
@ -91,24 +91,24 @@ Here is scsh's interface to dot-locking:
|
|||
(see below) rather than specifying a non-\sharpf \var{stale-time}
|
||||
\end{desc}
|
||||
|
||||
\defun {break-dot-lock} {filename} {undefined}
|
||||
\defun {break-dot-lock} {file-name} {undefined}
|
||||
|
||||
\begin{desc}
|
||||
Breaks the lock for \var{filename} if one exists.
|
||||
Breaks the lock for \var{file-name} if one exists.
|
||||
\end{desc}
|
||||
|
||||
\defun {release-dot-lock} {filename} {\boolean}
|
||||
\defun {release-dot-lock} {file-name} {\boolean}
|
||||
|
||||
\begin{desc}
|
||||
Releases the lock for \var{filename}. On success,
|
||||
Releases the lock for \var{file-name}. On success,
|
||||
\ex{release-dot-lock} returns \sharpt, otherwise \sharpf. Note that
|
||||
this procedure can also be used to break the lock for
|
||||
\var{filename}.
|
||||
\var{file-name}.
|
||||
\end{desc}
|
||||
|
||||
|
||||
\defun{with-dot-lock*} {filename thunk} {value(s) of thunk}
|
||||
\dfnx{with-dot-lock} {filename body \ldots} {value(s) of body}{syntax}
|
||||
\defun{with-dot-lock*} {file-name thunk} {value(s) of thunk}
|
||||
\dfnx{with-dot-lock} {file-name body \ldots} {value(s) of body}{syntax}
|
||||
|
||||
\begin{desc}
|
||||
This procedure obtains the requested lock, and then calls
|
||||
|
|
Loading…
Reference in New Issue