Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In tab:async.reqmts.executor.requirements, split post and defer into … #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/async.tex
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,15 @@
\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
\sync The invocation of \tcode{dispatch} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \\ \rowsep

\tcode{x1.post(std::move(f),~a)}\br
\tcode{x1.post(std::move(f),~a)} &
&
\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()}. The executor may begin \tcode{f1}'s progress. 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
\sync The invocation of \tcode{post} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \\ \rowsep

\tcode{x1.defer(std::move(f),~a)} &
&
\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
\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} \\
\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()}. The executor should not begin \tcode{f1}'s progress. \begin{note} 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} 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
\sync The invocation of \tcode{defer} synchronizes with (\CppXref{intro.multithread}) the invocation of \tcode{f1}. \\

\end{libreqtab3}

Expand Down