|
271 | 271 |
|
272 | 272 | \tcode{x1.dispatch(std::move(f),~a)} &
|
273 | 273 | &
|
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 |
275 | 275 | \sync The invocation of \tcode{dispatch} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \\ \rowsep
|
276 | 276 |
|
277 | 277 | \tcode{x1.post(std::move(f),~a)}\br
|
278 | 278 | \tcode{x1.defer(std::move(f),~a)} &
|
279 | 279 | &
|
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 |
281 | 281 | \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} \\
|
282 | 282 |
|
283 | 283 | \end{libreqtab3}
|
|
1661 | 1661 |
|
1662 | 1662 | \begin{itemdescr}
|
1663 | 1663 | \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}). |
1665 | 1665 | \end{itemdescr}
|
1666 | 1666 |
|
1667 | 1667 |
|
|
2099 | 2099 |
|
2100 | 2100 | \begin{itemdescr}
|
2101 | 2101 | \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}). |
2103 | 2103 | \end{itemdescr}
|
2104 | 2104 |
|
2105 | 2105 | \indexlibrarymember{post}{system_executor}%
|
|
2113 | 2113 |
|
2114 | 2114 | \begin{itemdescr}
|
2115 | 2115 | \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}. |
2117 | 2117 | \end{itemdescr}
|
2118 | 2118 |
|
2119 | 2119 |
|
|
2597 | 2597 |
|
2598 | 2598 | \begin{itemdescr}
|
2599 | 2599 | \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}). |
2601 | 2601 |
|
2602 | 2602 | \pnum
|
2603 | 2603 | \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 | 2611 |
|
2612 | 2612 | \begin{itemdescr}
|
2613 | 2613 | \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)}. |
2615 | 2615 |
|
2616 | 2616 | \pnum
|
2617 | 2617 | \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 | 2625 |
|
2626 | 2626 | \begin{itemdescr}
|
2627 | 2627 | \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)}. |
2629 | 2629 |
|
2630 | 2630 | \pnum
|
2631 | 2631 | \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 | 3370 |
|
3371 | 3371 | \begin{itemdescr}
|
3372 | 3372 | \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. |
3374 | 3374 | \end{itemdescr}
|
3375 | 3375 |
|
3376 | 3376 | \indexlibrarymember{post}{strand}%
|
|
3519 | 3519 | \remarks The return type \tcode{T} satisfies the \tcode{Destructible} (\CppXref{destructible}) and \tcode{MoveConstructible} (\CppXref{moveconstructible}) requirements.
|
3520 | 3520 |
|
3521 | 3521 | \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. |
3523 | 3523 |
|
3524 | 3524 | \pnum
|
3525 | 3525 | The implementation provides a partial specialization \tcode{template <class Result, class... Args> async_result<T, Result(Args...)>} such that:
|
|
0 commit comments