Skip to content

Commit b880f16

Browse files
GordonGordon
authored andcommitted
Issue #64: Remove explicit bind/unbind interface.
* Remove bind() and unbind() functions and the associated wording.
1 parent 684be18 commit b880f16

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

affinity/cpp-20/d0796r3.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,6 @@ If a particular policy or algorithm requires to access placement information, th
303303

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

306-
### Binding to execution
307-
308-
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`.
309-
310306
> [*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*]
311307
312308
## Header `<execution>` synopsis
@@ -410,9 +406,6 @@ A *thread of execution* can be requested to bind to a particular `execution_reso
410406

411407
namespace this_thread {
412408
std::experimental::execution::execution_resource get_resource() noexcept;
413-
414-
bool bind(execution_resource eR) noexcept;
415-
bool unbind(execution_resource eR) noexcept;
416409
}
417410

418411
} // experimental
@@ -601,26 +594,6 @@ The free function `this_system::get_resources` is provided for retrieving the `e
601594

602595
> [*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*]
603596
604-
### `this_thread::bind` & `this_thread::unbind`
605-
606-
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`.
607-
608-
bool bind(execution_resource eR) noexcept;
609-
610-
*Returns:* `true` if the requested binding was successful, otherwise `false`.
611-
612-
*Requires:* `eR.can_place_agents() == true`.
613-
614-
*Effects:* If successful, binds the current *thread of execution* to the specified `execution_resource`.
615-
616-
bool unbind(execution_resource eR) noexcept;
617-
618-
*Returns:* `true` if the requested unbinding was successful, otherwise `false`.
619-
620-
*Requires:* `eR.can_place_agents() == true`.
621-
622-
*Effects:* If successful, unbinds the current *thread of execution* from the specified `execution_resource`.
623-
624597
### `this_thread::get_resource`
625598

626599
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)