|
17 | 17 | ### P0796r3 (SAN 2018) |
18 | 18 |
|
19 | 19 | * Remove reference counting requirement from `execution_resource`. |
20 | | -* Change lifetime model of `execution_resource`: it now either consistently identifies some underlying resource, or is invalid; context creation rejects an invalid resource. |
| 20 | +* Change lifetime model of `execution_resource`: it now either consistently identifies some underlying resource, or is invalid; context creation rejects an invalid resource.ster |
| 21 | +* Remove `this_thread::bind` & `this_thread::unbind` interfaces. |
21 | 22 |
|
22 | 23 | ### P0796r2 (RAP 2018) |
23 | 24 |
|
@@ -358,10 +359,6 @@ If a particular policy or algorithm requires to access placement information, th |
358 | 359 |
|
359 | 360 | The `execution_resource` which underlies the current thread of execution can be queried through `this_thread::get_resource`. |
360 | 361 |
|
361 | | -### Binding to execution |
362 | | - |
363 | | -A *thread of execution* can be requested to bind to a particular `execution_resource` for a particular *execution agent* by calling `this_thread::bind` if that `execution_resource` is able to place agents. If the current *thread of execution* is successfully bound to the specified `execution_resource` it will return `true` otherwise it will return `false`. If the *thread of execution* is successfully bound to the specified `execution_resource` then `execution_resource` returned by `this_thread::get_resource` must be equal to the `execution_resource` provided to `this_thread::bind`. Subsequently a *thread of execution* can be unbound by calling `this_thread::unbind`. |
364 | | - |
365 | 362 | > [*Note:* Binding *threads of execution* can provide performance benefits when used in a way which compliments the application, however incorrect usage can lead to denial of service and therefore can cause loss of performance. *--end note*] |
366 | 363 |
|
367 | 364 | ## Header `<execution>` synopsis |
@@ -465,9 +462,6 @@ A *thread of execution* can be requested to bind to a particular `execution_reso |
465 | 462 |
|
466 | 463 | namespace this_thread { |
467 | 464 | std::experimental::execution::execution_resource get_resource() noexcept; |
468 | | - |
469 | | - bool bind(execution_resource eR) noexcept; |
470 | | - bool unbind(execution_resource eR) noexcept; |
471 | 465 | } |
472 | 466 |
|
473 | 467 | } // experimental |
@@ -656,26 +650,6 @@ The free function `this_system::get_resources` is provided for retrieving the `e |
656 | 650 |
|
657 | 651 | > [*Note:* Returning a `std::vector` allows users to potentially manipulate the container of `execution_resource`s after it is returned. We may want to replace this at a later date with an alternative type which is more restrictive, such as a range or span. *--end note*] |
658 | 652 |
|
659 | | -### `this_thread::bind` & `this_thread::unbind` |
660 | | - |
661 | | -The free functions `this_thread::bind` and `this_thread::unbind` are provided for binding / unbinding the current *thread of execution* to / from a particular `execution_resource`. |
662 | | - |
663 | | - bool bind(execution_resource eR) noexcept; |
664 | | - |
665 | | -*Returns:* `true` if the requested binding was successful, otherwise `false`. |
666 | | - |
667 | | -*Requires:* `eR.can_place_agents() == true`. |
668 | | - |
669 | | -*Effects:* If successful, binds the current *thread of execution* to the specified `execution_resource`. |
670 | | - |
671 | | - bool unbind(execution_resource eR) noexcept; |
672 | | - |
673 | | -*Returns:* `true` if the requested unbinding was successful, otherwise `false`. |
674 | | - |
675 | | -*Requires:* `eR.can_place_agents() == true`. |
676 | | - |
677 | | -*Effects:* If successful, unbinds the current *thread of execution* from the specified `execution_resource`. |
678 | | - |
679 | 653 | ### `this_thread::get_resource` |
680 | 654 |
|
681 | 655 | The free function `this_thread::get_resource` is provided for retrieving the `execution_resource` underlying the current thread of execution. |
|
0 commit comments