Skip to content

Commit 392bcd8

Browse files
authored
Merge pull request #72 from AerialMantis/issue-64
CP013: Remove explicit bind/unbind interface.
2 parents 926634e + 89863cc commit 392bcd8

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

affinity/cpp-20/d0796r3.md

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
### P0796r3 (SAN 2018)
1818

1919
* 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.
2122

2223
### P0796r2 (RAP 2018)
2324

@@ -358,10 +359,6 @@ If a particular policy or algorithm requires to access placement information, th
358359

359360
The `execution_resource` which underlies the current thread of execution can be queried through `this_thread::get_resource`.
360361

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-
365362
> [*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*]
366363
367364
## Header `<execution>` synopsis
@@ -465,9 +462,6 @@ A *thread of execution* can be requested to bind to a particular `execution_reso
465462

466463
namespace this_thread {
467464
std::experimental::execution::execution_resource get_resource() noexcept;
468-
469-
bool bind(execution_resource eR) noexcept;
470-
bool unbind(execution_resource eR) noexcept;
471465
}
472466

473467
} // experimental
@@ -656,26 +650,6 @@ The free function `this_system::get_resources` is provided for retrieving the `e
656650

657651
> [*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*]
658652
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-
679653
### `this_thread::get_resource`
680654

681655
The free function `this_thread::get_resource` is provided for retrieving the `execution_resource` underlying the current thread of execution.

0 commit comments

Comments
 (0)