Skip to content

Commit 7df308f

Browse files
committed
clean-up tex sources
1 parent 76424cc commit 7df308f

File tree

2 files changed

+3
-104
lines changed

2 files changed

+3
-104
lines changed

tex/jthread.tex

Lines changed: 1 addition & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -385,29 +385,6 @@
385385
}
386386
\end{codeblock}
387387

388-
%%*******************
389-
%%*** No-shared-stop-state indicator nostopstate_t
390-
%%*******************
391-
%\rSec3[stopsource.nostopstate]{No-shared-stop-state indicator}
392-
%
393-
%% double check nullopt_t
394-
%
395-
%\indexlibrary{\idxcode{nostopstate_t}}%
396-
%\indexlibrary{\idxcode{nostopstate}}%
397-
%\begin{itemdecl}
398-
%struct nostopstate_t{@\seebelow@};
399-
%inline constexpr nostopstate_t nostopstate(@\unspec@);
400-
%\end{itemdecl}
401-
%
402-
%\pnum
403-
%The struct \tcode{nostopstate_t} is an empty class type used as a unique type to indicate the state of
404-
%not containing a shared stop state for \tcode{stop_source} objects.
405-
%In particular, \tcode{stop_source} has a constructor with \tcode{nostopstate_t} as a single argument type;
406-
%this indicates that a \tcode{stop_source} object is constructed that has no shared stop state.
407-
%
408-
%\pnum
409-
%Type \tcode{nostopstate_t} does not have a default constructor or an initializer-list constructor,
410-
%and is not an aggregate.
411388

412389
%*******************
413390
%*** stop_source constructors
@@ -444,13 +421,7 @@
444421
stop_source(const stop_source& rhs) noexcept;
445422
\end{itemdecl}
446423
\begin{itemdescr}
447-
%\pnum\effects If \tcode{rhs.stop_possible()} is \tcode{true},
448-
% constructs a \tcode{stop_source}
449-
% that shares the ownership of the stop state with \tcode{rhs}.
450424

451-
% TODO: It's possible that evaluating stop_requested() == rhs.stop_requested()
452-
% could return 'false' if another thread concurrently called request_stop().
453-
% Is this a problem putting it in in a post-condition?
454425
\pnum\postconditions \tcode{*this == rhs} is \tcode{true}.
455426
\begin{note} \tcode{*this} and \tcode{rhs} share the ownership of the
456427
same stop state, if any. \end{note}
@@ -541,12 +512,6 @@
541512
\begin{itemdescr}
542513
\pnum\returns \tcode{true} if \tcode{*this} has ownership of a stop state;
543514
otherwise, \tcode{false}.
544-
% NOT NECESSARY:
545-
%The determination of the return values is performed atomically.
546-
%the stop source can be used to perform stop requests, executed atomically.
547-
%\begin{note} Returns \tcode{false} if the object was created with \tcode{nostopstate}
548-
% or the values were moved away.
549-
% \end{note}
550515
\end{itemdescr}
551516

552517
\indexlibrarymember{stop_requested}{stop_source}%
@@ -564,12 +529,6 @@
564529
bool request_stop() noexcept;
565530
\end{itemdecl}
566531
\begin{itemdescr}
567-
%\pnum\requires \tcode{stop_possible() == true}
568-
%Hans:
569-
%Did we discuss whether interrupt() on an invalid (e.g. default constructed) stop/interrupt token should be a no-op,
570-
%rather than undefined? I would expect that to be convenient if we start passing stop_tokens around explicitly.
571-
%Presumably a lot of short-lived tasks don't care about stopping/interruption, but might be used in a context in which an
572-
%stop/interrupt token is expected. With the change, you could just pass a default-constructed one.
573532

574533
\pnum\effects If \tcode{*this} does not have ownership of a stop state, returns \tcode{false}.
575534
Otherwise, atomically determines whether the owned stop state has received a stop request,
@@ -736,14 +695,6 @@
736695
the destructor does not block\iref{defns.block} waiting for the return from
737696
the invocation of \tcode{callback}.
738697
Releases ownership of the stop state, if any.
739-
740-
%\tcode{callback} is destroyed.
741-
%% TODO: FIX WORDING HERE:
742-
%If \tcode{\~stop_callback()} is invoked
743-
%%during invocation of the callback and both run on the same thread.
744-
%while the invocation of \tcode{callback}
745-
%is active on the current thread then the destructor does not block waiting
746-
%for the return from \tcode{callback}.
747698
\end{itemdescr}
748699

749700
}%\color{insertcolor}
@@ -775,7 +726,6 @@
775726
class jthread;
776727

777728
\end{codeblock}
778-
%void swap(jthread& x, jthread& y) noexcept;
779729
}%\color{insertcolor}
780730
\begin{codeblock}
781731
...
@@ -867,13 +817,6 @@
867817
}
868818
\end{codeblock}
869819

870-
%%{\color{blue}
871-
%[{\itshape{}Editorial note:} {After the synopsis, copy the whole description from
872-
% [thread.thread.constr] til [thread.thread.algorithm]
873-
% using \tcode{jthread} instead of \tcode{thread}
874-
% and apply the \color{diffcolor}differences signaled}. ]
875-
%}
876-
877820

878821
%*******************
879822
%*** jthread constructors
@@ -1557,17 +1500,8 @@
15571500
In that case the functions return immediately,
15581501
returning \tcode{false} if the predicate evaluates to \tcode{false}.
15591502

1560-
% Hans Boehm:
1561-
%We then also need some statement for the waiting functions that if they return with an stopped/interrupted status,
1562-
% their synchronization behavior is as though they called stop_requested().
1563-
%{\color{blue}
1564-
%[{\itshape{}Editorial note:} Because all signatures here in the effects clause call
1565-
% \tcode{stop_requested()}, we don't need wording
1566-
% that the calls synchronize with \tcode{interrupt()/request_stop()}. ]
1567-
%}
1568-
15691503

1570-
%**** untimed wait_until (with pred)
1504+
%**** wait_until (with pred)
15711505
% return false if stoken.stop_requested():
15721506

15731507
\begin{itemdecl}
@@ -1576,13 +1510,8 @@
15761510
Predicate pred,
15771511
stop_token stoken);
15781512
\end{itemdecl}
1579-
%{\color{blue}
1580-
%[{\itshape{}Editorial note:} {\color{diffcolor}This color signals differences to the corresponding \tcode{wait()} function without the stop token parameter.} ]
1581-
%}
15821513

15831514
\begin{itemdescr}
1584-
1585-
%{\color{diffcolor}
15861515
\pnum\effects Registers for the duration of this call \tcode{*this} to get notified on a stop request on \tcode{stoken}
15871516
during this call and then equivalent to:
15881517
\begin{codeblock}
@@ -1606,9 +1535,6 @@
16061535

16071536
\pnum \throws
16081537
Any exception thrown by \tcode{pred}.
1609-
1610-
%}%diffcolor
1611-
16121538
\end{itemdescr}
16131539

16141540

@@ -1623,9 +1549,6 @@
16231549
Predicate pred,
16241550
stop_token stoken);
16251551
\end{itemdecl}
1626-
%{\color{blue}
1627-
%[{\itshape{}Editorial note:} {\color{diffcolor}This color signals differences to the corresponding \tcode{wait_until()} function without the stop token parameter.} ]
1628-
%}
16291552

16301553
\begin{itemdescr}
16311554
\pnum\effects Registers for the duration of this call \tcode{*this} to get notified on a stop request on \tcode{stoken}
@@ -1661,10 +1584,6 @@
16611584
Timeout-related exceptions \iref{thread.req.timing},
16621585
or any exception thrown by \tcode{pred}.
16631586

1664-
%{\color{diffcolor}
1665-
% \pnum\sync If the function returns with an stopped/interrupted status,
1666-
% their synchronization behavior is as though it called \tcode{stop_requested()}.
1667-
%}%diffcolor
16681587
\end{itemdescr}
16691588

16701589

@@ -1678,9 +1597,6 @@
16781597
Predicate pred,
16791598
stop_token stoken);
16801599
\end{itemdecl}
1681-
%{\color{blue}
1682-
%[{\itshape{}Editorial note:} {\color{diffcolor}This color signals differences to the corresponding \tcode{wait_for()} function without the stop token parameter.} ]
1683-
%}
16841600
\begin{itemdescr}
16851601
\pnum \effects Equivalent to:
16861602
\begin{codeblock}
@@ -1717,10 +1633,6 @@
17171633
\tcode{<stop_token>}
17181634

17191635

1720-
%[except.terminate]:1.13:
1721-
%when execution of the initial function of a thread exits via an exception (32.3.2.2), or
1722-
1723-
17241636
{\color{blue}
17251637
In 17.12.3.4 Resumption [coroutine.handle.resumption]/1:
17261638
}
@@ -1763,16 +1675,3 @@
17631675
at the time it constructed the object.
17641676

17651677

1766-
%32.6.9[futures.async]/3.1
1767-
%If launch::async is set in policy, calls INVOKE(decay-copy(std::forward<F>(f)), decaycopy(
1768-
%std::forward<Args>(args))...) (20.14.3, 32.3.2.2) as if in a new thread of execution
1769-
%represented by a thread object with the calls to decay-copy being evaluated in the thread that
1770-
%called async.
1771-
1772-
1773-
%Additionally, in 32.3.2[thread.thread.class]/1, there is wording that a std::thread object uniquely represents a thread of execution. I don't know that the added [thread.jthread.class]/1 is enough when it says same functionality as thread.
1774-
%
1775-
% Do we need to say that a std::jthread object uniquely represents a thread of execution?
1776-
%
1777-
% Do we need to say anything about thread and jthread objects not simultaneously representing the same thread of execution? In other words, given a thread object and a jthread object, they should not represent the same thread of execution. Since there is no interface in either thread or jthread that would allow this, I am ok if the answer is no we don't need to say anything.
1778-

tex/jthreadP660.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
\begin{tabular}{@{}ll}
77
Project: & ISO JTC1/SC22/WG21: Programming Language C++ \\
88
Doc No: & WG21 P0660R10 \\
9-
Date: & 2019-07-18 \\
9+
Date: & 2019-07-19 \\
1010
Reply to: & Nicolai Josuttis (nico@josuttis.de), \\
1111
& Lewis Baker (lbaker@fb.com) \\
1212
& Billy O'Neal (bion@microsoft.com) \\
@@ -29,7 +29,7 @@ \subsubsection*{New in R10}
2929
\item Class \tcode{jthread} is now part of header \tcode{<thread>}.
3030
\item Copy missing definitions from class \tcode{std::thread} to class \tcode{std::jthread}.
3131
\item Extend cross references to \tcode{std::thread}.
32-
\item Several (other) fixes from LWG review.
32+
\item Several (other) fixes from LWG multiple reviews.
3333
\item Several editorial fixes.
3434
\end{itemize}
3535

0 commit comments

Comments
 (0)