diff --git a/affinity/cpp-20/d0796r3.md b/affinity/cpp-20/d0796r3.md index f34854c..9f62c3d 100644 --- a/affinity/cpp-20/d0796r3.md +++ b/affinity/cpp-20/d0796r3.md @@ -17,7 +17,8 @@ ### P0796r3 (SAN 2018) * Remove reference counting requirement from `execution_resource`. -* Change lifetime model of `execution_resource`: it now either consistently identifies some underlying resource, or is invalid; context creation rejects an invalid resource. +* Change lifetime model of `execution_resource`: it now either consistently identifies some underlying resource, or is invalid; context creation rejects an invalid resource.ster +* Remove `this_thread::bind` & `this_thread::unbind` interfaces. ### P0796r2 (RAP 2018) @@ -358,10 +359,6 @@ If a particular policy or algorithm requires to access placement information, th The `execution_resource` which underlies the current thread of execution can be queried through `this_thread::get_resource`. -### Binding to execution - -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`. - > [*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*] ## Header `` synopsis @@ -465,9 +462,6 @@ A *thread of execution* can be requested to bind to a particular `execution_reso namespace this_thread { std::experimental::execution::execution_resource get_resource() noexcept; - - bool bind(execution_resource eR) noexcept; - bool unbind(execution_resource eR) noexcept; } } // experimental @@ -656,26 +650,6 @@ The free function `this_system::get_resources` is provided for retrieving the `e > [*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*] -### `this_thread::bind` & `this_thread::unbind` - -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`. - - bool bind(execution_resource eR) noexcept; - -*Returns:* `true` if the requested binding was successful, otherwise `false`. - -*Requires:* `eR.can_place_agents() == true`. - -*Effects:* If successful, binds the current *thread of execution* to the specified `execution_resource`. - - bool unbind(execution_resource eR) noexcept; - -*Returns:* `true` if the requested unbinding was successful, otherwise `false`. - -*Requires:* `eR.can_place_agents() == true`. - -*Effects:* If successful, unbinds the current *thread of execution* from the specified `execution_resource`. - ### `this_thread::get_resource` The free function `this_thread::get_resource` is provided for retrieving the `execution_resource` underlying the current thread of execution.