tmp/tmpg9ox3n98/{from.md → to.md}
RENAMED
|
@@ -17,10 +17,14 @@ template <class F, class Allocator>
|
|
| 17 |
*Requires:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `t1, t2, ..., tN`
|
| 18 |
are values of the corresponding types in `ArgTypes...`, shall be a valid
|
| 19 |
expression. Invoking a copy of `f` shall behave the same as invoking
|
| 20 |
`f`.
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
*Effects:* constructs a new `packaged_task` object with a shared state
|
| 23 |
and initializes the object’s stored task with `std::forward<F>(f)`. The
|
| 24 |
constructors that take an `Allocator` argument use it to allocate memory
|
| 25 |
needed to store the internal data structures.
|
| 26 |
|
|
@@ -104,20 +108,10 @@ or the stored task has already been invoked.
|
|
| 104 |
|
| 105 |
- `promise_already_satisfied` if the stored task has already been
|
| 106 |
invoked.
|
| 107 |
- `no_state` if `*this` has no shared state.
|
| 108 |
|
| 109 |
-
*Synchronization:* a successful call to `operator()` synchronizes
|
| 110 |
-
with ([[intro.multithread]]) a call to any member function of a
|
| 111 |
-
`future` or `shared_future` object that shares the shared state of
|
| 112 |
-
`*this`. The completion of the invocation of the stored task and the
|
| 113 |
-
storage of the result (whether normal or exceptional) into the shared
|
| 114 |
-
state synchronizes with ([[intro.multithread]]) the successful return
|
| 115 |
-
from any member function that detects that the state is set to ready.
|
| 116 |
-
`operator()` synchronizes and serializes with other functions through
|
| 117 |
-
the shared state.
|
| 118 |
-
|
| 119 |
``` cpp
|
| 120 |
void make_ready_at_thread_exit(ArgTypes... args);
|
| 121 |
```
|
| 122 |
|
| 123 |
*Effects:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `f` is the stored
|
|
|
|
| 17 |
*Requires:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `t1, t2, ..., tN`
|
| 18 |
are values of the corresponding types in `ArgTypes...`, shall be a valid
|
| 19 |
expression. Invoking a copy of `f` shall behave the same as invoking
|
| 20 |
`f`.
|
| 21 |
|
| 22 |
+
*Remarks:* These constructors shall not participate in overload
|
| 23 |
+
resolution if `decay_t<F>` is the same type as
|
| 24 |
+
`std::packaged_task<R(ArgTypes...)>`.
|
| 25 |
+
|
| 26 |
*Effects:* constructs a new `packaged_task` object with a shared state
|
| 27 |
and initializes the object’s stored task with `std::forward<F>(f)`. The
|
| 28 |
constructors that take an `Allocator` argument use it to allocate memory
|
| 29 |
needed to store the internal data structures.
|
| 30 |
|
|
|
|
| 108 |
|
| 109 |
- `promise_already_satisfied` if the stored task has already been
|
| 110 |
invoked.
|
| 111 |
- `no_state` if `*this` has no shared state.
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
``` cpp
|
| 114 |
void make_ready_at_thread_exit(ArgTypes... args);
|
| 115 |
```
|
| 116 |
|
| 117 |
*Effects:* *`INVOKE`*`(f, t1, t2, ..., tN, R)`, where `f` is the stored
|