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