tmp/tmpckl38g7u/{from.md → to.md}
RENAMED
|
@@ -2,12 +2,13 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
~thread();
|
| 5 |
```
|
| 6 |
|
| 7 |
-
If `joinable()`, calls `
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
~thread();
|
| 5 |
```
|
| 6 |
|
| 7 |
+
If `joinable()`, calls `terminate()`. Otherwise, has no effects.
|
| 8 |
+
|
| 9 |
+
[*Note 1*: Either implicitly detaching or joining a `joinable()` thread
|
| 10 |
+
in its destructor could result in difficult to debug correctness (for
|
| 11 |
+
detach) or performance (for join) bugs encountered only when an
|
| 12 |
+
exception is thrown. Thus the programmer must ensure that the destructor
|
| 13 |
+
is never executed while the thread is still joinable. — *end note*]
|
| 14 |
|