Skip to content

Commit

Permalink
Delete deprecated headers
Browse files Browse the repository at this point in the history
This diff removes the following deprecated headers:
 - `<unifex/execute.hpp>` (use `spawn_detached()`)
 - `<unifex/ready_done_sender.hpp>` (use `just_done()`)
 - `<unifex/submit.hpp>` (use `spawn_detached()`)`
 - `<unifex/via.hpp>` (use `typed_via()`)
 - `<unifex/via_stream.pp>` (use `typed_via_stream()`)
  • Loading branch information
ispeters committed Jun 12, 2023
1 parent e3e8fc0 commit 5daf47f
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 1,142 deletions.
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ endforeach()

if(CXX_MEMORY_RESOURCE_HAVE_PMR)
target_link_libraries(any_unique PUBLIC std::memory_resource)
target_link_libraries(submit_allocator_customisation PUBLIC std::memory_resource)
endif()

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand Down
34 changes: 0 additions & 34 deletions examples/execute.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions examples/for_each_via_thread_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <unifex/sync_wait.hpp>
#include <unifex/then.hpp>
#include <unifex/transform_stream.hpp>
#include <unifex/via_stream.hpp>
#include <unifex/typed_via_stream.hpp>

#include <cstdio>

Expand All @@ -30,7 +30,7 @@ int main() {

sync_wait(then(
for_each(
via_stream(
typed_via_stream(
context.get_scheduler(),
transform_stream(
range_stream{0, 10},
Expand Down
6 changes: 3 additions & 3 deletions examples/fp_delegation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <unifex/sync_wait.hpp>
#include <unifex/timed_single_thread_context.hpp>
#include <unifex/transform_stream.hpp>
#include <unifex/via_stream.hpp>
#include <unifex/typed_via_stream.hpp>
#include <unifex/with_query_value.hpp>

#include <atomic>
Expand Down Expand Up @@ -191,10 +191,10 @@ int main() {
sync_wait(
then(
for_each(
via_stream(
typed_via_stream(
outer_delegating_ctx.get_scheduler(),
transform_stream(
via_stream(
typed_via_stream(
inner_delegating_ctx.get_scheduler(),
transform_stream(
range_stream{0, 10},
Expand Down
4 changes: 2 additions & 2 deletions examples/get_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <unifex/sync_wait.hpp>
#include <unifex/timed_single_thread_context.hpp>
#include <unifex/transform_stream.hpp>
#include <unifex/via_stream.hpp>
#include <unifex/typed_via_stream.hpp>
#include <unifex/with_query_value.hpp>

#include <chrono>
Expand All @@ -45,7 +45,7 @@ int main() {
// composed operations.
sync_wait(with_query_value(
then(
for_each(via_stream(current_scheduler,
for_each(typed_via_stream(current_scheduler,
transform_stream(range_stream{0, 10},
[](int value) {
return value * value;
Expand Down
114 changes: 0 additions & 114 deletions examples/submit_allocator_customisation.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions examples/via.cpp

This file was deleted.

78 changes: 0 additions & 78 deletions include/unifex/execute.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions include/unifex/never.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <unifex/config.hpp>
#include <unifex/get_stop_token.hpp>
#include <unifex/manual_lifetime.hpp>
#include <unifex/ready_done_sender.hpp>
#include <unifex/just_done.hpp>
#include <unifex/receiver_concepts.hpp>
#include <unifex/stop_token_concepts.hpp>
#include <unifex/get_stop_token.hpp>
Expand Down Expand Up @@ -101,8 +101,8 @@ struct stream {
friend constexpr sender tag_invoke(tag_t<next>, stream&) noexcept {
return {};
}
friend constexpr ready_done_sender tag_invoke(tag_t<cleanup>, stream&) noexcept {
return {};
friend constexpr auto tag_invoke(tag_t<cleanup>, stream&) noexcept {
return just_done();
}
};
} // namespace _never
Expand Down
6 changes: 3 additions & 3 deletions include/unifex/range_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#pragma once

#include <unifex/blocking.hpp>
#include <unifex/ready_done_sender.hpp>
#include <unifex/just_done.hpp>
#include <unifex/receiver_concepts.hpp>
#include <unifex/stream_concepts.hpp>

Expand Down Expand Up @@ -78,8 +78,8 @@ struct stream {
return next_sender{s};
}

friend ready_done_sender tag_invoke(tag_t<cleanup>, stream&) noexcept {
return {};
friend auto tag_invoke(tag_t<cleanup>, stream&) noexcept {
return just_done();
}
};

Expand Down
Loading

0 comments on commit 5daf47f

Please sign in to comment.