tmp/tmp4x2on24x/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
void swap(thread& x) noexcept;
|
| 5 |
```
|
| 6 |
|
|
@@ -14,24 +14,23 @@ bool joinable() const noexcept;
|
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
void join();
|
| 17 |
```
|
| 18 |
|
| 19 |
-
*Effects:*
|
| 20 |
-
completed.
|
| 21 |
|
| 22 |
*Synchronization:* The completion of the thread represented by `*this`
|
| 23 |
-
synchronizes with
|
| 24 |
`join()` return.
|
| 25 |
|
| 26 |
[*Note 1*: Operations on `*this` are not synchronized. — *end note*]
|
| 27 |
|
| 28 |
-
*
|
| 29 |
`get_id() == id()`.
|
| 30 |
|
| 31 |
*Throws:* `system_error` when an exception is
|
| 32 |
-
required
|
| 33 |
|
| 34 |
*Error conditions:*
|
| 35 |
|
| 36 |
- `resource_deadlock_would_occur` — if deadlock is detected or
|
| 37 |
`get_id() == this_thread::get_id()`.
|
|
@@ -44,16 +43,16 @@ void detach();
|
|
| 44 |
|
| 45 |
*Effects:* The thread represented by `*this` continues execution without
|
| 46 |
the calling thread blocking. When `detach()` returns, `*this` no longer
|
| 47 |
represents the possibly continuing thread of execution. When the thread
|
| 48 |
previously represented by `*this` ends execution, the implementation
|
| 49 |
-
|
| 50 |
|
| 51 |
-
*
|
| 52 |
|
| 53 |
*Throws:* `system_error` when an exception is
|
| 54 |
-
required
|
| 55 |
|
| 56 |
*Error conditions:*
|
| 57 |
|
| 58 |
- `no_such_process` — if the thread is not valid.
|
| 59 |
- `invalid_argument` — if the thread is not joinable.
|
|
|
|
| 1 |
+
#### Members <a id="thread.thread.member">[[thread.thread.member]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
void swap(thread& x) noexcept;
|
| 5 |
```
|
| 6 |
|
|
|
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
void join();
|
| 17 |
```
|
| 18 |
|
| 19 |
+
*Effects:* Blocks until the thread represented by `*this` has completed.
|
|
|
|
| 20 |
|
| 21 |
*Synchronization:* The completion of the thread represented by `*this`
|
| 22 |
+
synchronizes with [[intro.multithread]] the corresponding successful
|
| 23 |
`join()` return.
|
| 24 |
|
| 25 |
[*Note 1*: Operations on `*this` are not synchronized. — *end note*]
|
| 26 |
|
| 27 |
+
*Ensures:* The thread represented by `*this` has completed.
|
| 28 |
`get_id() == id()`.
|
| 29 |
|
| 30 |
*Throws:* `system_error` when an exception is
|
| 31 |
+
required [[thread.req.exception]].
|
| 32 |
|
| 33 |
*Error conditions:*
|
| 34 |
|
| 35 |
- `resource_deadlock_would_occur` — if deadlock is detected or
|
| 36 |
`get_id() == this_thread::get_id()`.
|
|
|
|
| 43 |
|
| 44 |
*Effects:* The thread represented by `*this` continues execution without
|
| 45 |
the calling thread blocking. When `detach()` returns, `*this` no longer
|
| 46 |
represents the possibly continuing thread of execution. When the thread
|
| 47 |
previously represented by `*this` ends execution, the implementation
|
| 48 |
+
releases any owned resources.
|
| 49 |
|
| 50 |
+
*Ensures:* `get_id() == id()`.
|
| 51 |
|
| 52 |
*Throws:* `system_error` when an exception is
|
| 53 |
+
required [[thread.req.exception]].
|
| 54 |
|
| 55 |
*Error conditions:*
|
| 56 |
|
| 57 |
- `no_such_process` — if the thread is not valid.
|
| 58 |
- `invalid_argument` — if the thread is not joinable.
|