Skip to content

Commit 2c8dfe9

Browse files
authored
Merge 2019-07 LWG Motion 28
P0660R10 Stop Token and Joining Thread Fixes #3032.
2 parents da8bf1f + cf1bc27 commit 2c8dfe9

File tree

6 files changed

+1275
-112
lines changed

6 files changed

+1275
-112
lines changed

source/algorithms.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@
439439
in a thread of execution implicitly created by the library
440440
to support parallel algorithm execution.
441441
If the threads of execution created by \tcode{thread}\iref{thread.thread.class}
442+
or \tcode{jthread}\iref{thread.jthread.class}
442443
provide concurrent forward progress guarantees\iref{intro.progress},
443444
then a thread of execution implicitly created by the library will provide
444445
parallel forward progress guarantees;

source/basic.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5923,11 +5923,12 @@
59235923

59245924
\pnum
59255925
It is \impldef{whether the thread that executes \tcode{main} and the threads created
5926-
by \tcode{std::thread} provide concurrent forward progress guarantees} whether the
5926+
by \tcode{std::thread} or \tcode{std::jthread} provide concurrent forward progress guarantees} whether the
59275927
implementation-created thread of execution that executes
59285928
\tcode{main}\iref{basic.start.main} and the threads of execution created by
5929-
\tcode{std::thread}\iref{thread.thread.class} provide concurrent forward progress
5930-
guarantees.
5929+
\tcode{std::thread}\iref{thread.thread.class}
5930+
or \tcode{std::jthread}\iref{thread.jthread.class}
5931+
provide concurrent forward progress guarantees.
59315932
\begin{note}
59325933
General-purpose implementations should provide these guarantees.
59335934
\end{note}

source/lib-intro.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,9 @@
12181218
\tcode{<sstream>} \\
12191219
\tcode{<stack>} \\
12201220
\tcode{<stdexcept>} \\
1221-
\tcode{<streambuf>} \\
1221+
\tcode{<stop_token>} \\
12221222
\columnbreak
1223+
\tcode{<streambuf>} \\
12231224
\tcode{<string>} \\
12241225
\tcode{<string_view>} \\
12251226
\tcode{<strstream>} \\

source/numerics.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@
163163
The floating-point environment has thread storage
164164
duration\iref{basic.stc.thread}. The initial state for a thread's floating-point
165165
environment is the state of the floating-point environment of the thread that constructs
166-
the corresponding \tcode{thread} object\iref{thread.thread.class} at the time it
166+
the corresponding \tcode{thread} object\iref{thread.thread.class}
167+
or \tcode{jthread} object\iref{thread.jthread.class}
168+
at the time it
167169
constructed the object. \begin{note} That is, the child thread gets the floating-point
168170
state of the parent thread at the time of the child's creation. \end{note}
169171

source/support.tex

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,16 @@
640640
\tcode{<type_traits>} \\ \rowsep
641641
\defnlibxname{cpp_lib_is_invocable} & \tcode{201703L} &
642642
\tcode{<type_traits>} \\ \rowsep
643+
\defnlibxname{cpp_lib_is_layout_compatible} & \tcode{201907L} &
644+
\tcode{<type_traits>} \\ \rowsep
643645
\defnlibxname{cpp_lib_is_null_pointer} & \tcode{201309L} &
644646
\tcode{<type_traits>} \\ \rowsep
645-
\defnlibxname{cpp_lib_is_swappable} & \tcode{201603L} &
647+
\defnlibxname{cpp_lib_is_pointer_interconvertible} & \tcode{201907L} &
646648
\tcode{<type_traits>} \\ \rowsep
649+
\defnlibxname{cpp_lib_is_swappable} & \tcode{201603L} &
650+
\tcode{stop_token} \tcode{<type_traits>} \\ \rowsep
651+
\defnlibxname{cpp_lib_jthread} & \tcode{201907L} &
652+
\tcode{<thread>} \\ \rowsep
647653
\defnlibxname{cpp_lib_latch} & \tcode{201907L} &
648654
\tcode{<latch>} \\ \rowsep
649655
\defnlibxname{cpp_lib_launder} & \tcode{201606L} &
@@ -5147,9 +5153,9 @@
51475153
Resuming a coroutine via \tcode{resume}, \tcode{operator()}, or \tcode{destroy}
51485154
on an execution agent other than the one on which it was suspended
51495155
has implementation-defined behavior unless
5150-
each execution agent is either
5151-
an instance of \tcode{std::thread} or
5152-
the thread that executes \tcode{main}.
5156+
each execution agent either is
5157+
an instance of \tcode{std::thread} or \tcode{std::jthread},
5158+
or is the thread that executes \tcode{main}.
51535159
\begin{note}
51545160
A coroutine that is resumed on a different execution agent should
51555161
avoid relying on consistent thread identity throughout, such as holding

0 commit comments

Comments
 (0)