|
18 | 18 | #define STDEXEC_SYSTEM_CONTEXT_REPLACEABILITY_API_H |
19 | 19 |
|
20 | 20 | #include "../../stdexec/__detail/__execution_fwd.hpp" |
21 | | -#include "../../stdexec/__detail/__system_context_replaceability_api.hpp" |
| 21 | +#include "../../stdexec/__detail/__parallel_scheduler_replacement_api.hpp" |
22 | 22 |
|
23 | 23 | #include <memory> |
24 | 24 |
|
25 | | -namespace experimental::execution::system_context_replaceability |
| 25 | +namespace experimental::execution |
26 | 26 | { |
27 | | - using STDEXEC::system_context_replaceability::__parallel_scheduler_backend_factory_t; |
| 27 | + namespace [[deprecated("Use the STDEXEC::parallel_scheduler_replacement namespace " |
| 28 | + "instead.")]] system_context_replaceability |
| 29 | + { |
| 30 | + using STDEXEC::parallel_scheduler_replacement::__parallel_scheduler_backend_factory_t; |
28 | 31 |
|
29 | | - /// Interface for the parallel scheduler backend. |
30 | | - using parallel_scheduler_backend |
31 | | - [[deprecated("Use STDEXEC::system_context_replaceability::parallel_scheduler_backend " |
32 | | - "instead.")]] = STDEXEC::system_context_replaceability::parallel_scheduler_backend; |
| 32 | + /// Interface for the parallel scheduler backend. |
| 33 | + using parallel_scheduler_backend // |
| 34 | + [[deprecated("Use STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend " |
| 35 | + "instead.")]] = // |
| 36 | + STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend; |
33 | 37 |
|
34 | | - /// Get the backend for the parallel scheduler. |
35 | | - /// Users might replace this function. |
36 | | - [[deprecated("Use STDEXEC::system_context_replaceability::query_parallel_scheduler_backend " |
37 | | - "instead.")]] |
38 | | - inline auto query_parallel_scheduler_backend() |
39 | | - -> std::shared_ptr<STDEXEC::system_context_replaceability::parallel_scheduler_backend> |
40 | | - { |
41 | | - return STDEXEC::system_context_replaceability::query_parallel_scheduler_backend(); |
42 | | - } |
| 38 | + /// Get the backend for the parallel scheduler. |
| 39 | + /// Users might replace this function. |
| 40 | + [[deprecated("Use STDEXEC::parallel_scheduler_replacement::query_parallel_scheduler_backend " |
| 41 | + "instead.")]] |
| 42 | + inline auto query_parallel_scheduler_backend() |
| 43 | + -> std::shared_ptr<STDEXEC::parallel_scheduler_replacement::parallel_scheduler_backend> |
| 44 | + { |
| 45 | + return STDEXEC::parallel_scheduler_replacement::query_parallel_scheduler_backend(); |
| 46 | + } |
43 | 47 |
|
44 | | - STDEXEC_PRAGMA_PUSH() |
45 | | - STDEXEC_PRAGMA_IGNORE_GNU("-Wdeprecated-declarations") |
46 | | - STDEXEC_PRAGMA_IGNORE_MSVC(4996) // warning C4996: 'function': was declared deprecated |
47 | | - STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity) |
48 | | - /// Set a factory for the parallel scheduler backend. |
49 | | - /// Can be used to replace the parallel scheduler at runtime. |
50 | | - /// Out of spec. |
51 | | - [[deprecated("Use STDEXEC::system_context_replaceability::set_parallel_scheduler_backend " |
52 | | - "instead.")]] |
53 | | - inline auto set_parallel_scheduler_backend(__parallel_scheduler_backend_factory_t __new_factory) |
54 | | - -> __parallel_scheduler_backend_factory_t |
55 | | - { |
56 | | - return STDEXEC::system_context_replaceability::set_parallel_scheduler_backend(__new_factory); |
57 | | - } |
58 | | - STDEXEC_PRAGMA_POP() |
| 48 | + STDEXEC_PRAGMA_PUSH() |
| 49 | + STDEXEC_PRAGMA_IGNORE_GNU("-Wdeprecated-declarations") |
| 50 | + STDEXEC_PRAGMA_IGNORE_MSVC(4996) // warning C4996: 'function': was declared deprecated |
| 51 | + STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity) |
| 52 | + STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity_with_custom_message) |
| 53 | + /// Set a factory for the parallel scheduler backend. |
| 54 | + /// Can be used to replace the parallel scheduler at runtime. |
| 55 | + /// Out of spec. |
| 56 | + [[deprecated("Use STDEXEC::parallel_scheduler_replacement::set_parallel_scheduler_backend " |
| 57 | + "instead.")]] |
| 58 | + inline auto set_parallel_scheduler_backend(__parallel_scheduler_backend_factory_t __new_factory) |
| 59 | + -> __parallel_scheduler_backend_factory_t |
| 60 | + { |
| 61 | + return STDEXEC::parallel_scheduler_replacement::set_parallel_scheduler_backend(__new_factory); |
| 62 | + } |
| 63 | + STDEXEC_PRAGMA_POP() |
59 | 64 |
|
60 | | - /// Interface for completing a sender operation. Backend will call frontend though this interface |
61 | | - /// for completing the `schedule` and `schedule_bulk` operations. |
62 | | - using receiver |
63 | | - [[deprecated("Use STDEXEC::system_context_replaceability::receiver_proxy " |
64 | | - "instead.")]] = STDEXEC::system_context_replaceability::receiver_proxy; |
| 65 | + /// Interface for completing a sender operation. Backend will call frontend though this interface |
| 66 | + /// for completing the `schedule` and `schedule_bulk` operations. |
| 67 | + using receiver |
| 68 | + [[deprecated("Use STDEXEC::parallel_scheduler_replacement::receiver_proxy " |
| 69 | + "instead.")]] = STDEXEC::parallel_scheduler_replacement::receiver_proxy; |
65 | 70 |
|
66 | | - /// Receiver for bulk scheduling operations. |
67 | | - using bulk_item_receiver |
68 | | - [[deprecated("Use STDEXEC::system_context_replaceability::bulk_item_receiver_proxy " |
69 | | - "instead.")]] = STDEXEC::system_context_replaceability::bulk_item_receiver_proxy; |
70 | | -} // namespace experimental::execution::system_context_replaceability |
| 71 | + /// Receiver for bulk scheduling operations. |
| 72 | + using bulk_item_receiver [[deprecated( |
| 73 | + "Use STDEXEC::parallel_scheduler_replacement::bulk_item_receiver_proxy " |
| 74 | + "instead.")]] = STDEXEC::parallel_scheduler_replacement::bulk_item_receiver_proxy; |
| 75 | + } // namespace system_context_replaceability |
| 76 | +} // namespace experimental::execution |
71 | 77 |
|
72 | 78 | namespace exec = experimental::execution; |
73 | 79 |
|
|
0 commit comments