tmp/tmpzduc_dda/{from.md → to.md}
RENAMED
|
@@ -402,26 +402,26 @@ namespace std {
|
|
| 402 |
jthread& operator=(const jthread&) = delete;
|
| 403 |
jthread& operator=(jthread&&) noexcept;
|
| 404 |
|
| 405 |
// [thread.jthread.mem], members
|
| 406 |
void swap(jthread&) noexcept;
|
| 407 |
-
|
| 408 |
void join();
|
| 409 |
void detach();
|
| 410 |
-
|
| 411 |
-
|
| 412 |
|
| 413 |
// [thread.jthread.stop], stop token handling
|
| 414 |
-
|
| 415 |
-
|
| 416 |
bool request_stop() noexcept;
|
| 417 |
|
| 418 |
// [thread.jthread.special], specialized algorithms
|
| 419 |
friend void swap(jthread& lhs, jthread& rhs) noexcept;
|
| 420 |
|
| 421 |
// [thread.jthread.static], static members
|
| 422 |
-
|
| 423 |
|
| 424 |
private:
|
| 425 |
stop_source ssource; // exposition only
|
| 426 |
};
|
| 427 |
}
|
|
@@ -533,11 +533,11 @@ void swap(jthread& x) noexcept;
|
|
| 533 |
```
|
| 534 |
|
| 535 |
*Effects:* Exchanges the values of `*this` and `x`.
|
| 536 |
|
| 537 |
``` cpp
|
| 538 |
-
|
| 539 |
```
|
| 540 |
|
| 541 |
*Returns:* `get_id() != id()`.
|
| 542 |
|
| 543 |
``` cpp
|
|
@@ -594,17 +594,17 @@ represent a thread, otherwise `this_thread::get_id()` for the thread of
|
|
| 594 |
execution represented by `*this`.
|
| 595 |
|
| 596 |
#### Stop token handling <a id="thread.jthread.stop">[[thread.jthread.stop]]</a>
|
| 597 |
|
| 598 |
``` cpp
|
| 599 |
-
|
| 600 |
```
|
| 601 |
|
| 602 |
*Effects:* Equivalent to: `return ssource;`
|
| 603 |
|
| 604 |
``` cpp
|
| 605 |
-
|
| 606 |
```
|
| 607 |
|
| 608 |
*Effects:* Equivalent to: `return ssource.get_token();`
|
| 609 |
|
| 610 |
``` cpp
|
|
@@ -622,11 +622,11 @@ friend void swap(jthread& x, jthread& y) noexcept;
|
|
| 622 |
*Effects:* Equivalent to: `x.swap(y)`.
|
| 623 |
|
| 624 |
#### Static members <a id="thread.jthread.static">[[thread.jthread.static]]</a>
|
| 625 |
|
| 626 |
``` cpp
|
| 627 |
-
|
| 628 |
```
|
| 629 |
|
| 630 |
*Returns:* `thread::hardware_concurrency()`.
|
| 631 |
|
| 632 |
### Namespace `this_thread` <a id="thread.thread.this">[[thread.thread.this]]</a>
|
|
|
|
| 402 |
jthread& operator=(const jthread&) = delete;
|
| 403 |
jthread& operator=(jthread&&) noexcept;
|
| 404 |
|
| 405 |
// [thread.jthread.mem], members
|
| 406 |
void swap(jthread&) noexcept;
|
| 407 |
+
bool joinable() const noexcept;
|
| 408 |
void join();
|
| 409 |
void detach();
|
| 410 |
+
id get_id() const noexcept;
|
| 411 |
+
native_handle_type native_handle(); // see~[thread.req.native]
|
| 412 |
|
| 413 |
// [thread.jthread.stop], stop token handling
|
| 414 |
+
stop_source get_stop_source() noexcept;
|
| 415 |
+
stop_token get_stop_token() const noexcept;
|
| 416 |
bool request_stop() noexcept;
|
| 417 |
|
| 418 |
// [thread.jthread.special], specialized algorithms
|
| 419 |
friend void swap(jthread& lhs, jthread& rhs) noexcept;
|
| 420 |
|
| 421 |
// [thread.jthread.static], static members
|
| 422 |
+
static unsigned int hardware_concurrency() noexcept;
|
| 423 |
|
| 424 |
private:
|
| 425 |
stop_source ssource; // exposition only
|
| 426 |
};
|
| 427 |
}
|
|
|
|
| 533 |
```
|
| 534 |
|
| 535 |
*Effects:* Exchanges the values of `*this` and `x`.
|
| 536 |
|
| 537 |
``` cpp
|
| 538 |
+
bool joinable() const noexcept;
|
| 539 |
```
|
| 540 |
|
| 541 |
*Returns:* `get_id() != id()`.
|
| 542 |
|
| 543 |
``` cpp
|
|
|
|
| 594 |
execution represented by `*this`.
|
| 595 |
|
| 596 |
#### Stop token handling <a id="thread.jthread.stop">[[thread.jthread.stop]]</a>
|
| 597 |
|
| 598 |
``` cpp
|
| 599 |
+
stop_source get_stop_source() noexcept;
|
| 600 |
```
|
| 601 |
|
| 602 |
*Effects:* Equivalent to: `return ssource;`
|
| 603 |
|
| 604 |
``` cpp
|
| 605 |
+
stop_token get_stop_token() const noexcept;
|
| 606 |
```
|
| 607 |
|
| 608 |
*Effects:* Equivalent to: `return ssource.get_token();`
|
| 609 |
|
| 610 |
``` cpp
|
|
|
|
| 622 |
*Effects:* Equivalent to: `x.swap(y)`.
|
| 623 |
|
| 624 |
#### Static members <a id="thread.jthread.static">[[thread.jthread.static]]</a>
|
| 625 |
|
| 626 |
``` cpp
|
| 627 |
+
static unsigned int hardware_concurrency() noexcept;
|
| 628 |
```
|
| 629 |
|
| 630 |
*Returns:* `thread::hardware_concurrency()`.
|
| 631 |
|
| 632 |
### Namespace `this_thread` <a id="thread.thread.this">[[thread.thread.this]]</a>
|