Skip to content

Commit 6182f81

Browse files
committed
Use \placeholdernc for INVOKE and DECAY_COPY
1 parent 7d88638 commit 6182f81

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/async.tex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,13 @@
271271

272272
\tcode{x1.dispatch(std::move(f),~a)} &
273273
&
274-
\effects Creates an object \tcode{f1} initialized with \tcode{\textit{DECAY_COPY}(forward<Func>(f))} (\CppXref{thread.decaycopy}) in the current thread of execution . Calls \tcode{f1()} at most once. The executor may block forward progress of the caller until \tcode{f1()} finishes execution. Executor implementations should use the supplied allocator to allocate any memory required to store the function object. Prior to invoking the function object, the executor shall deallocate any memory allocated. \begin{note} Executors defined in this Technical Specification always use the supplied allocator unless otherwise specified. \end{note} \br
274+
\effects Creates an object \tcode{f1} initialized with \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))} (\CppXref{thread.decaycopy}) in the current thread of execution . Calls \tcode{f1()} at most once. The executor may block forward progress of the caller until \tcode{f1()} finishes execution. Executor implementations should use the supplied allocator to allocate any memory required to store the function object. Prior to invoking the function object, the executor shall deallocate any memory allocated. \begin{note} Executors defined in this Technical Specification always use the supplied allocator unless otherwise specified. \end{note} \br
275275
\sync The invocation of \tcode{dispatch} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \\ \rowsep
276276

277277
\tcode{x1.post(std::move(f),~a)}\br
278278
\tcode{x1.defer(std::move(f),~a)} &
279279
&
280-
\effects Creates an object \tcode{f1} initialized with \tcode{\textit{DECAY_COPY}(forward<Func>(f))} in the current thread of execution. Calls \tcode{f1()} at most once. The executor shall not block forward progress of the caller pending completion of \tcode{f1()}. Executor implementations should use the supplied allocator to allocate any memory required to store the function object. Prior to invoking the function object, the executor shall deallocate any memory allocated. \begin{note} Executors defined in this Technical Specification always use the supplied allocator unless otherwise specified. \end{note}\br
280+
\effects Creates an object \tcode{f1} initialized with \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))} in the current thread of execution. Calls \tcode{f1()} at most once. The executor shall not block forward progress of the caller pending completion of \tcode{f1()}. Executor implementations should use the supplied allocator to allocate any memory required to store the function object. Prior to invoking the function object, the executor shall deallocate any memory allocated. \begin{note} Executors defined in this Technical Specification always use the supplied allocator unless otherwise specified. \end{note}\br
281281
\sync The invocation of \tcode{post} or \tcode{defer} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \begin{note} Although the requirements placed on \tcode{defer} are identical to \tcode{post}, the use of \tcode{post} conveys a preference that the caller does not block the first step of \tcode{f1}'s progress, whereas \tcode{defer} conveys a preference that the caller does block the first step of \tcode{f1}. One use of \tcode{defer} is to convey the intention of the caller that \tcode{f1} is a continuation of the current call context. The executor may use this information to optimize or otherwise adjust the way in which \tcode{f1} is invoked. \end{note} \\
282282

283283
\end{libreqtab3}
@@ -1661,7 +1661,7 @@
16611661

16621662
\begin{itemdescr}
16631663
\pnum
1664-
\returns \tcode{\textit{INVOKE}(get(), forward<Args>(args)...)} (\CppXref{func.require}).
1664+
\returns \tcode{\placeholdernc{INVOKE}(get(), forward<Args>(args)...)} (\CppXref{func.require}).
16651665
\end{itemdescr}
16661666

16671667

@@ -2099,7 +2099,7 @@
20992099

21002100
\begin{itemdescr}
21012101
\pnum
2102-
\effects Equivalent to \tcode{\textit{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}).
2102+
\effects Equivalent to \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}).
21032103
\end{itemdescr}
21042104

21052105
\indexlibrarymember{post}{system_executor}%
@@ -2113,7 +2113,7 @@
21132113

21142114
\begin{itemdescr}
21152115
\pnum
2116-
\effects If \tcode{context().stopped() == false}, creates an object \tcode{f1} initialized with \tcode{\textit{DECAY_COPY}(forward<Func>(f))}, and calls \tcode{f1} as if in a thread of execution represented by a \tcode{thread} object. Any exception propagated from the execution of \tcode{\textit{DECAY_COPY}(forward<Func>(f))()} results in a call to \tcode{std::terminate}.
2116+
\effects If \tcode{context().stopped() == false}, creates an object \tcode{f1} initialized with \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))}, and calls \tcode{f1} as if in a thread of execution represented by a \tcode{thread} object. Any exception propagated from the execution of \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))()} results in a call to \tcode{std::terminate}.
21172117
\end{itemdescr}
21182118

21192119

@@ -2597,7 +2597,7 @@
25972597

25982598
\begin{itemdescr}
25992599
\pnum
2600-
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\textit{DECAY_COPY}(f)} (\CppXref{thread.decaycopy}).
2600+
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\placeholdernc{DECAY_COPY}(f)} (\CppXref{thread.decaycopy}).
26012601

26022602
\pnum
26032603
\effects \tcode{e.dispatch(g, a1)}, where \tcode{g} is a function object of unspecified type that, when called as \tcode{g()}, performs \tcode{fd()}. The allocator \tcode{a} is used to allocate any memory required to implement \tcode{g}.
@@ -2611,7 +2611,7 @@
26112611

26122612
\begin{itemdescr}
26132613
\pnum
2614-
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\textit{DECAY_COPY}(f)}.
2614+
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\placeholdernc{DECAY_COPY}(f)}.
26152615

26162616
\pnum
26172617
\effects \tcode{e.post(g, a1)}, where \tcode{g} is a function object of unspecified type that, when called as \tcode{g()}, performs \tcode{fd()}. The allocator \tcode{a} is used to allocate any memory required to implement \tcode{g}.
@@ -2625,7 +2625,7 @@
26252625

26262626
\begin{itemdescr}
26272627
\pnum
2628-
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\textit{DECAY_COPY}(f)}.
2628+
Let \tcode{e} be the target object of \tcode{*this}. Let \tcode{a1} be the allocator that was specified when the target was set. Let \tcode{fd} be the result of \tcode{\placeholdernc{DECAY_COPY}(f)}.
26292629

26302630
\pnum
26312631
\effects \tcode{e.defer(g, a1)}, where \tcode{g} is a function object of unspecified type that, when called as \tcode{g()}, performs \tcode{fd()}. The allocator \tcode{a} is used to allocate any memory required to implement \tcode{g}.
@@ -3370,7 +3370,7 @@
33703370

33713371
\begin{itemdescr}
33723372
\pnum
3373-
\effects If \tcode{running_in_this_thread() == true}, calls \tcode{\textit{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}). \begin{note} If \tcode{f} exits via an exception, the exception propagates to the caller of \tcode{dispatch()}. \end{note} Otherwise, requests invocation of \tcode{f}, as if by forwarding the function object \tcode{f} and allocator \tcode{a} to the executor \tcode{inner_ex_}, such that the guarantees of ordering and non-concurrency are met.
3373+
\effects If \tcode{running_in_this_thread() == true}, calls \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}). \begin{note} If \tcode{f} exits via an exception, the exception propagates to the caller of \tcode{dispatch()}. \end{note} Otherwise, requests invocation of \tcode{f}, as if by forwarding the function object \tcode{f} and allocator \tcode{a} to the executor \tcode{inner_ex_}, such that the guarantees of ordering and non-concurrency are met.
33743374
\end{itemdescr}
33753375

33763376
\indexlibrarymember{post}{strand}%
@@ -3519,7 +3519,7 @@
35193519
\remarks The return type \tcode{T} satisfies the \tcode{Destructible} (\CppXref{destructible}) and \tcode{MoveConstructible} (\CppXref{moveconstructible}) requirements.
35203520

35213521
\pnum
3522-
The object \tcode{h} of type \tcode{H} is an asynchronous provider with an associated shared state (\CppXref{futures.state}). The effect of \tcode{h(a$_0$, ..., a$_{N-1}$)} is to atomically store the result of \tcode{\textit{INVOKE}(fd, forward<A$_0$>(a$_0$), ..., forward<A$_{N-1}$>(a$_{N-1}$))} (\CppXref{func.require}) in the shared state and make the shared state ready. If \tcode{fd} exits via an exception then that exception is atomically stored in the shared state and the shared state is made ready.
3522+
The object \tcode{h} of type \tcode{H} is an asynchronous provider with an associated shared state (\CppXref{futures.state}). The effect of \tcode{h(a$_0$, ..., a$_{N-1}$)} is to atomically store the result of \tcode{\placeholdernc{INVOKE}(fd, forward<A$_0$>(a$_0$), ..., forward<A$_{N-1}$>(a$_{N-1}$))} (\CppXref{func.require}) in the shared state and make the shared state ready. If \tcode{fd} exits via an exception then that exception is atomically stored in the shared state and the shared state is made ready.
35233523

35243524
\pnum
35253525
The implementation provides a partial specialization \tcode{template <class Result, class... Args> async_result<T, Result(Args...)>} such that:

src/basicioservices.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@
483483

484484
\begin{itemdescr}
485485
\pnum
486-
\effects If \tcode{running_in_this_thread()} is \tcode{true}, calls \tcode{\textit{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}). \begin{note} If \tcode{f} exits via an exception, the exception propagates to the caller of \tcode{dispatch()}. \end{note} Otherwise, calls \tcode{post(forward<Func>(f), a)}.
486+
\effects If \tcode{running_in_this_thread()} is \tcode{true}, calls \tcode{\placeholdernc{DECAY_COPY}(forward<Func>(f))()} (\CppXref{thread.decaycopy}). \begin{note} If \tcode{f} exits via an exception, the exception propagates to the caller of \tcode{dispatch()}. \end{note} Otherwise, calls \tcode{post(forward<Func>(f), a)}.
487487
\end{itemdescr}
488488

489489
\indexlibrarymember{post}{io_context::executor_type}%

0 commit comments

Comments
 (0)