tmp/tmpn0byl81h/{from.md → to.md}
RENAMED
|
@@ -23,12 +23,12 @@ namespace std {
|
|
| 23 |
template <class F, class Allocator>
|
| 24 |
explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f);
|
| 25 |
~packaged_task();
|
| 26 |
|
| 27 |
// no copy
|
| 28 |
-
packaged_task(packaged_task&) = delete;
|
| 29 |
-
packaged_task& operator=(packaged_task&) = delete;
|
| 30 |
|
| 31 |
// move support
|
| 32 |
packaged_task(packaged_task&& rhs) noexcept;
|
| 33 |
packaged_task& operator=(packaged_task&& rhs) noexcept;
|
| 34 |
void swap(packaged_task& other) noexcept;
|
|
@@ -70,10 +70,14 @@ template <class F, class Allocator>
|
|
| 70 |
*Requires:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `t1, t2, ..., tN`
|
| 71 |
are values of the corresponding types in `ArgTypes...`, shall be a valid
|
| 72 |
expression. Invoking a copy of `f` shall behave the same as invoking
|
| 73 |
`f`.
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
*Effects:* constructs a new `packaged_task` object with a shared state
|
| 76 |
and initializes the object’s stored task with `std::forward<F>(f)`. The
|
| 77 |
constructors that take an `Allocator` argument use it to allocate memory
|
| 78 |
needed to store the internal data structures.
|
| 79 |
|
|
@@ -157,20 +161,10 @@ or the stored task has already been invoked.
|
|
| 157 |
|
| 158 |
- `promise_already_satisfied` if the stored task has already been
|
| 159 |
invoked.
|
| 160 |
- `no_state` if `*this` has no shared state.
|
| 161 |
|
| 162 |
-
*Synchronization:* a successful call to `operator()` synchronizes
|
| 163 |
-
with ([[intro.multithread]]) a call to any member function of a
|
| 164 |
-
`future` or `shared_future` object that shares the shared state of
|
| 165 |
-
`*this`. The completion of the invocation of the stored task and the
|
| 166 |
-
storage of the result (whether normal or exceptional) into the shared
|
| 167 |
-
state synchronizes with ([[intro.multithread]]) the successful return
|
| 168 |
-
from any member function that detects that the state is set to ready.
|
| 169 |
-
`operator()` synchronizes and serializes with other functions through
|
| 170 |
-
the shared state.
|
| 171 |
-
|
| 172 |
``` cpp
|
| 173 |
void make_ready_at_thread_exit(ArgTypes... args);
|
| 174 |
```
|
| 175 |
|
| 176 |
*Effects:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `f` is the stored
|
|
@@ -230,10 +224,11 @@ template <class R, class Alloc>
|
|
| 230 |
[atomics]: atomics.md#atomics
|
| 231 |
[basic.life]: basic.md#basic.life
|
| 232 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 233 |
[bitmask.types]: library.md#bitmask.types
|
| 234 |
[class]: class.md#class
|
|
|
|
| 235 |
[func.require]: utilities.md#func.require
|
| 236 |
[futures]: #futures
|
| 237 |
[futures.async]: #futures.async
|
| 238 |
[futures.errors]: #futures.errors
|
| 239 |
[futures.future_error]: #futures.future_error
|
|
@@ -258,10 +253,15 @@ template <class R, class Alloc>
|
|
| 258 |
[thread.decaycopy]: #thread.decaycopy
|
| 259 |
[thread.general]: #thread.general
|
| 260 |
[thread.lock]: #thread.lock
|
| 261 |
[thread.lock.algorithm]: #thread.lock.algorithm
|
| 262 |
[thread.lock.guard]: #thread.lock.guard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
[thread.lock.unique]: #thread.lock.unique
|
| 264 |
[thread.lock.unique.cons]: #thread.lock.unique.cons
|
| 265 |
[thread.lock.unique.locking]: #thread.lock.unique.locking
|
| 266 |
[thread.lock.unique.mod]: #thread.lock.unique.mod
|
| 267 |
[thread.lock.unique.obs]: #thread.lock.unique.obs
|
|
@@ -282,10 +282,12 @@ template <class R, class Alloc>
|
|
| 282 |
[thread.req.lockable.req]: #thread.req.lockable.req
|
| 283 |
[thread.req.lockable.timed]: #thread.req.lockable.timed
|
| 284 |
[thread.req.native]: #thread.req.native
|
| 285 |
[thread.req.paramname]: #thread.req.paramname
|
| 286 |
[thread.req.timing]: #thread.req.timing
|
|
|
|
|
|
|
| 287 |
[thread.thread.algorithm]: #thread.thread.algorithm
|
| 288 |
[thread.thread.assign]: #thread.thread.assign
|
| 289 |
[thread.thread.class]: #thread.thread.class
|
| 290 |
[thread.thread.constr]: #thread.thread.constr
|
| 291 |
[thread.thread.destr]: #thread.thread.destr
|
|
|
|
| 23 |
template <class F, class Allocator>
|
| 24 |
explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f);
|
| 25 |
~packaged_task();
|
| 26 |
|
| 27 |
// no copy
|
| 28 |
+
packaged_task(const packaged_task&) = delete;
|
| 29 |
+
packaged_task& operator=(const packaged_task&) = delete;
|
| 30 |
|
| 31 |
// move support
|
| 32 |
packaged_task(packaged_task&& rhs) noexcept;
|
| 33 |
packaged_task& operator=(packaged_task&& rhs) noexcept;
|
| 34 |
void swap(packaged_task& other) noexcept;
|
|
|
|
| 70 |
*Requires:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `t1, t2, ..., tN`
|
| 71 |
are values of the corresponding types in `ArgTypes...`, shall be a valid
|
| 72 |
expression. Invoking a copy of `f` shall behave the same as invoking
|
| 73 |
`f`.
|
| 74 |
|
| 75 |
+
*Remarks:* These constructors shall not participate in overload
|
| 76 |
+
resolution if `decay_t<F>` is the same type as
|
| 77 |
+
`std::packaged_task<R(ArgTypes...)>`.
|
| 78 |
+
|
| 79 |
*Effects:* constructs a new `packaged_task` object with a shared state
|
| 80 |
and initializes the object’s stored task with `std::forward<F>(f)`. The
|
| 81 |
constructors that take an `Allocator` argument use it to allocate memory
|
| 82 |
needed to store the internal data structures.
|
| 83 |
|
|
|
|
| 161 |
|
| 162 |
- `promise_already_satisfied` if the stored task has already been
|
| 163 |
invoked.
|
| 164 |
- `no_state` if `*this` has no shared state.
|
| 165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
``` cpp
|
| 167 |
void make_ready_at_thread_exit(ArgTypes... args);
|
| 168 |
```
|
| 169 |
|
| 170 |
*Effects:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `f` is the stored
|
|
|
|
| 224 |
[atomics]: atomics.md#atomics
|
| 225 |
[basic.life]: basic.md#basic.life
|
| 226 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 227 |
[bitmask.types]: library.md#bitmask.types
|
| 228 |
[class]: class.md#class
|
| 229 |
+
[except.terminate]: except.md#except.terminate
|
| 230 |
[func.require]: utilities.md#func.require
|
| 231 |
[futures]: #futures
|
| 232 |
[futures.async]: #futures.async
|
| 233 |
[futures.errors]: #futures.errors
|
| 234 |
[futures.future_error]: #futures.future_error
|
|
|
|
| 253 |
[thread.decaycopy]: #thread.decaycopy
|
| 254 |
[thread.general]: #thread.general
|
| 255 |
[thread.lock]: #thread.lock
|
| 256 |
[thread.lock.algorithm]: #thread.lock.algorithm
|
| 257 |
[thread.lock.guard]: #thread.lock.guard
|
| 258 |
+
[thread.lock.shared]: #thread.lock.shared
|
| 259 |
+
[thread.lock.shared.cons]: #thread.lock.shared.cons
|
| 260 |
+
[thread.lock.shared.locking]: #thread.lock.shared.locking
|
| 261 |
+
[thread.lock.shared.mod]: #thread.lock.shared.mod
|
| 262 |
+
[thread.lock.shared.obs]: #thread.lock.shared.obs
|
| 263 |
[thread.lock.unique]: #thread.lock.unique
|
| 264 |
[thread.lock.unique.cons]: #thread.lock.unique.cons
|
| 265 |
[thread.lock.unique.locking]: #thread.lock.unique.locking
|
| 266 |
[thread.lock.unique.mod]: #thread.lock.unique.mod
|
| 267 |
[thread.lock.unique.obs]: #thread.lock.unique.obs
|
|
|
|
| 282 |
[thread.req.lockable.req]: #thread.req.lockable.req
|
| 283 |
[thread.req.lockable.timed]: #thread.req.lockable.timed
|
| 284 |
[thread.req.native]: #thread.req.native
|
| 285 |
[thread.req.paramname]: #thread.req.paramname
|
| 286 |
[thread.req.timing]: #thread.req.timing
|
| 287 |
+
[thread.sharedtimedmutex.class]: #thread.sharedtimedmutex.class
|
| 288 |
+
[thread.sharedtimedmutex.requirements]: #thread.sharedtimedmutex.requirements
|
| 289 |
[thread.thread.algorithm]: #thread.thread.algorithm
|
| 290 |
[thread.thread.assign]: #thread.thread.assign
|
| 291 |
[thread.thread.class]: #thread.thread.class
|
| 292 |
[thread.thread.constr]: #thread.thread.constr
|
| 293 |
[thread.thread.destr]: #thread.thread.destr
|