Skip to content

Commit b874420

Browse files
jensmaurertkoeppe
authored andcommitted
[thread] Canonicalize order of library descriptive elements
1 parent d6d36b4 commit b874420

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

source/threads.tex

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,18 +2162,18 @@
21622162
\effects
21632163
Blocks the calling thread until ownership of the mutex can be obtained for the calling thread.
21642164

2165+
\pnum
2166+
\sync
2167+
Prior \tcode{unlock()} operations on the same object
2168+
\term{synchronize with}\iref{intro.multithread} this operation.
2169+
21652170
\pnum
21662171
\ensures
21672172
The calling thread owns the mutex.
21682173

21692174
\pnum
21702175
\returntype \tcode{void}.
21712176

2172-
\pnum
2173-
\sync
2174-
Prior \tcode{unlock()} operations on the same object
2175-
\term{synchronize with}\iref{intro.multithread} this operation.
2176-
21772177
\pnum
21782178
\throws
21792179
\tcode{system_error} when
@@ -2214,13 +2214,6 @@
22142214
An implementation should ensure that \tcode{try_lock()} does not consistently return \tcode{false}
22152215
in the absence of contending mutex acquisitions.
22162216

2217-
\pnum
2218-
\returntype \tcode{bool}.
2219-
2220-
\pnum
2221-
\returns
2222-
\tcode{true} if ownership was obtained, otherwise \tcode{false}.
2223-
22242217
\pnum
22252218
\sync
22262219
If \tcode{try_lock()} returns \tcode{true}, prior \tcode{unlock()} operations
@@ -2231,6 +2224,13 @@
22312224
known about the state after a failure, even in the absence of spurious failures.
22322225
\end{note}
22332226

2227+
\pnum
2228+
\returntype \tcode{bool}.
2229+
2230+
\pnum
2231+
\returns
2232+
\tcode{true} if ownership was obtained, otherwise \tcode{false}.
2233+
22342234
\pnum
22352235
\throws
22362236
Nothing.
@@ -2415,18 +2415,18 @@
24152415
lock is available, but implementations are expected to make a strong effort to do so.
24162416
\end{note}
24172417

2418+
\pnum
2419+
\sync
2420+
If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations
2421+
on the same object \term{synchronize with}\iref{intro.multithread} this operation.
2422+
24182423
\pnum
24192424
\returntype \tcode{bool}.
24202425

24212426
\pnum
24222427
\returns
24232428
\tcode{true} if ownership was obtained, otherwise \tcode{false}.
24242429

2425-
\pnum
2426-
\sync
2427-
If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations
2428-
on the same object \term{synchronize with}\iref{intro.multithread} this operation.
2429-
24302430
\pnum
24312431
\throws
24322432
Timeout-related exceptions\iref{thread.req.timing}.
@@ -2456,19 +2456,19 @@
24562456
strong effort to do so.
24572457
\end{note}
24582458

2459+
\pnum
2460+
\sync
2461+
If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()}
2462+
operations on the same object \term{synchronize with}\iref{intro.multithread}
2463+
this operation.
2464+
24592465
\pnum
24602466
\returntype \tcode{bool}.
24612467

24622468
\pnum
24632469
\returns
24642470
\tcode{true} if ownership was obtained, otherwise \tcode{false}.
24652471

2466-
\pnum
2467-
\sync
2468-
If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()}
2469-
operations on the same object \term{synchronize with}\iref{intro.multithread}
2470-
this operation.
2471-
24722472
\pnum
24732473
\throws
24742474
Timeout-related exceptions\iref{thread.req.timing}.
@@ -2634,17 +2634,17 @@
26342634
Blocks the calling thread until shared ownership of the mutex can be obtained for the calling thread.
26352635
If an exception is thrown then a shared lock has not been acquired for the current thread.
26362636

2637+
\pnum
2638+
\sync
2639+
Prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation.
2640+
26372641
\pnum
26382642
\ensures
26392643
The calling thread has a shared lock on the mutex.
26402644

26412645
\pnum
26422646
\returntype \tcode{void}.
26432647

2644-
\pnum
2645-
\sync
2646-
Prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation.
2647-
26482648
\pnum
26492649
\throws
26502650
\tcode{system_error} when an exception is required\iref{thread.req.exception}.
@@ -2697,19 +2697,19 @@
26972697
effect and \tcode{try_lock_shared()} immediately returns. An implementation
26982698
may fail to obtain the lock even if it is not held by any other thread.
26992699

2700+
\pnum
2701+
\sync
2702+
If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()}
2703+
operations on the same object synchronize with\iref{intro.multithread} this
2704+
operation.
2705+
27002706
\pnum
27012707
\returntype \tcode{bool}.
27022708

27032709
\pnum
27042710
\returns
27052711
\tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
27062712

2707-
\pnum
2708-
\sync
2709-
If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()}
2710-
operations on the same object synchronize with\iref{intro.multithread} this
2711-
operation.
2712-
27132713
\pnum
27142714
\throws
27152715
Nothing.
@@ -2811,19 +2811,19 @@
28112811
If an exception is thrown then a shared lock has not been acquired for
28122812
the current thread.
28132813

2814+
\pnum
2815+
\sync
2816+
If \tcode{try_lock_shared_for()} returns \tcode{true}, prior
2817+
\tcode{unlock()} operations on the same object synchronize
2818+
with\iref{intro.multithread} this operation.
2819+
28142820
\pnum
28152821
\returntype \tcode{bool}.
28162822

28172823
\pnum
28182824
\returns
28192825
\tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
28202826

2821-
\pnum
2822-
\sync
2823-
If \tcode{try_lock_shared_for()} returns \tcode{true}, prior
2824-
\tcode{unlock()} operations on the same object synchronize
2825-
with\iref{intro.multithread} this operation.
2826-
28272827
\pnum
28282828
\throws
28292829
Timeout-related exceptions\iref{thread.req.timing}.
@@ -2854,19 +2854,19 @@
28542854
If an exception is thrown then a shared lock has not been acquired for
28552855
the current thread.
28562856

2857+
\pnum
2858+
\sync
2859+
If \tcode{try_lock_shared_until()} returns \tcode{true}, prior
2860+
\tcode{unlock()} operations on the same object synchronize
2861+
with\iref{intro.multithread} this operation.
2862+
28572863
\pnum
28582864
\returntype \tcode{bool}.
28592865

28602866
\pnum
28612867
\returns
28622868
\tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
28632869

2864-
\pnum
2865-
\sync
2866-
If \tcode{try_lock_shared_until()} returns \tcode{true}, prior
2867-
\tcode{unlock()} operations on the same object synchronize
2868-
with\iref{intro.multithread} this operation.
2869-
28702870
\pnum
28712871
\throws
28722872
Timeout-related exceptions\iref{thread.req.timing}.
@@ -6363,11 +6363,6 @@
63636363
\end{itemdecl}
63646364

63656365
\begin{itemdescr}
6366-
\pnum
6367-
\returns
6368-
A \tcode{future<R>} object with the same shared state as
6369-
\tcode{*this}.
6370-
63716366
\pnum
63726367
\sync
63736368
Calls to this function do not introduce
@@ -6380,6 +6375,11 @@
63806375
Such calls need not synchronize with each other.
63816376
\end{note}
63826377

6378+
\pnum
6379+
\returns
6380+
A \tcode{future<R>} object with the same shared state as
6381+
\tcode{*this}.
6382+
63836383
\pnum
63846384
\throws
63856385
\tcode{future_error} if \tcode{*this} has no shared state or if
@@ -7275,16 +7275,6 @@
72757275
in this document nor by the implementation, the behavior is undefined.
72767276
\end{itemize}
72777277

7278-
\pnum
7279-
\returns
7280-
An object of type
7281-
\tcode{future<invoke_result_t<decay_t<F>, decay_t<Args>...>>} that refers
7282-
to the shared state created by this call to \tcode{async}.
7283-
\begin{note}
7284-
If a future obtained from \tcode{async} is moved outside the local scope,
7285-
the future's destructor can block for the shared state to become ready.
7286-
\end{note}
7287-
72887278
\pnum
72897279
\sync
72907280
The invocation of \tcode{async} synchronizes with the invocation of \tcode{f}.
@@ -7315,6 +7305,16 @@
73157305
happens first.
73167306
\end{itemize}
73177307

7308+
\pnum
7309+
\returns
7310+
An object of type
7311+
\tcode{future<invoke_result_t<decay_t<F>, decay_t<Args>...>>} that refers
7312+
to the shared state created by this call to \tcode{async}.
7313+
\begin{note}
7314+
If a future obtained from \tcode{async} is moved outside the local scope,
7315+
the future's destructor can block for the shared state to become ready.
7316+
\end{note}
7317+
73187318
\pnum
73197319
\throws
73207320
\tcode{system_error} if \tcode{policy == launch::async} and the
@@ -7551,10 +7551,6 @@
75517551
\end{itemdecl}
75527552

75537553
\begin{itemdescr}
7554-
\pnum
7555-
\returns
7556-
A \tcode{future} object that shares the same shared state as \tcode{*this}.
7557-
75587554
\pnum
75597555
\sync
75607556
Calls to this function do not introduce
@@ -7565,6 +7561,10 @@
75657561
Such calls need not synchronize with each other.
75667562
\end{note}
75677563

7564+
\pnum
7565+
\returns
7566+
A \tcode{future} object that shares the same shared state as \tcode{*this}.
7567+
75687568
\pnum
75697569
\throws
75707570
A \tcode{future_error} object if an error occurs.

0 commit comments

Comments
 (0)