Skip to content

Commit 245db35

Browse files
Dawn Perchikzygoloid
authored andcommitted
LWG3030 Who shall meet the requirements of try_lock?
1 parent 849d7b4 commit 245db35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/threads.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,8 +2699,8 @@
26992699
\effects Calls \tcode{try_lock()} for each argument in order beginning with the
27002700
first until all arguments have been processed or a call to \tcode{try_lock()} fails,
27012701
either by returning \tcode{false} or by throwing an exception. If a call to
2702-
\tcode{try_lock()} fails, \tcode{unlock()} shall be called for all prior arguments
2703-
and there shall be no further calls to \tcode{try_lock()}.
2702+
\tcode{try_lock()} fails, \tcode{unlock()} is called for all prior arguments
2703+
with no further calls to \tcode{try_lock()}.
27042704

27052705
\pnum
27062706
\returns \tcode{-1} if all calls to \tcode{try_lock()} returned \tcode{true},
@@ -2722,11 +2722,11 @@
27222722

27232723
\pnum
27242724
\effects All arguments are locked via a sequence of calls to \tcode{lock()},
2725-
\tcode{try_lock()}, or \tcode{unlock()} on each argument. The sequence of calls shall
2725+
\tcode{try_lock()}, or \tcode{unlock()} on each argument. The sequence of calls does
27262726
not result in deadlock, but is otherwise unspecified. \begin{note} A deadlock avoidance
27272727
algorithm such as try-and-back-off must be used, but the specific algorithm is not
27282728
specified to avoid over-constraining implementations. \end{note} If a call to
2729-
\tcode{lock()} or \tcode{try_lock()} throws an exception, \tcode{unlock()} shall be
2729+
\tcode{lock()} or \tcode{try_lock()} throws an exception, \tcode{unlock()} is
27302730
called for any argument that had been locked by a call to \tcode{lock()} or
27312731
\tcode{try_lock()}.
27322732
\end{itemdescr}

0 commit comments

Comments
 (0)