Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ FetchContent_Declare(
execution
# FETCHCONTENT_SOURCE_DIR_EXECUTION ${CMAKE_SOURCE_DIR}/../execution
GIT_REPOSITORY https://github.com/bemanproject/execution
GIT_TAG 09d5a5c
GIT_TAG cad563e
SYSTEM
FIND_PACKAGE_ARGS
0.2.0
Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if(NOT MSVC)
task-sender
alloc-1
alloc-2
bulk
c++now-allocator
c++now-cancel
c++now-errors
Expand Down
2 changes: 0 additions & 2 deletions examples/bulk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

namespace ex = beman::execution;
namespace beman::execution {
inline constexpr struct par_t {
} par{};
using parallel_scheduler = inline_scheduler;
} // namespace beman::execution

Expand Down
69 changes: 0 additions & 69 deletions include/beman/task/detail/inline_scheduler.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions include/beman/task/detail/promise_env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ template <typename Promise>
struct promise_env {
const Promise* promise;

auto query(const ::beman::execution::get_allocator_t&) const noexcept -> typename Promise::allocator_type {
return this->promise->get_allocator();
}
auto query(const ::beman::execution::get_scheduler_t&) const noexcept -> typename Promise::scheduler_type {
return this->promise->get_scheduler();
}
auto query(const ::beman::execution::get_allocator_t&) const noexcept -> typename Promise::allocator_type {
return this->promise->get_allocator();
}
auto query(const ::beman::execution::get_stop_token_t&) const noexcept -> typename Promise::stop_token_type {
return this->promise->get_stop_token();
}
Expand Down
1 change: 0 additions & 1 deletion include/beman/task/detail/promise_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <beman/task/detail/final_awaiter.hpp>
#include <beman/task/detail/find_allocator.hpp>
#include <beman/task/detail/handle.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/task/detail/promise_base.hpp>
#include <beman/task/detail/result_type.hpp>
#include <beman/task/detail/scheduler_of.hpp>
Expand Down
1 change: 0 additions & 1 deletion include/beman/task/detail/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <beman/task/detail/completion.hpp>
#include <beman/task/detail/scheduler_of.hpp>
#include <beman/task/detail/stop_source.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/task/detail/final_awaiter.hpp>
#include <beman/task/detail/handle.hpp>
#include <beman/task/detail/sub_visit.hpp>
Expand Down
9 changes: 4 additions & 5 deletions include/beman/task/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#ifndef INCLUDED_INCLUDE_BEMAN_TASK_TASK
#define INCLUDED_INCLUDE_BEMAN_TASK_TASK

#include <beman/execution/execution.hpp>
#include <beman/task/detail/allocator_of.hpp>
#include <beman/task/detail/task_scheduler.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/task/detail/into_optional.hpp>
#include <beman/task/detail/task.hpp>
#include <beman/task/detail/scheduler_of.hpp>
Expand All @@ -23,7 +23,7 @@ template <typename Context>
using stop_source_of_t = ::beman::task::detail::stop_source_of_t<Context>;

using task_scheduler = ::beman::task::detail::task_scheduler;
using inline_scheduler = ::beman::task::detail::inline_scheduler;
using inline_scheduler = ::beman::execution::inline_scheduler;
using into_optional_t = ::beman::task::detail::into_optional_t;
using ::beman::task::detail::into_optional;

Expand All @@ -39,9 +39,8 @@ using scheduler_of_t = ::beman::task::detail::scheduler_of_t<Context>;
template <typename Context>
using stop_source_of_t = ::beman::task::detail::stop_source_of_t<Context>;

using task_scheduler = ::beman::task::detail::task_scheduler;
using inline_scheduler = ::beman::task::detail::inline_scheduler;
using into_optional_t = ::beman::task::detail::into_optional_t;
using task_scheduler = ::beman::task::detail::task_scheduler;
using into_optional_t = ::beman::task::detail::into_optional_t;
using ::beman::task::detail::into_optional;

using ::beman::task::detail::change_coroutine_scheduler;
Expand Down
1 change: 0 additions & 1 deletion src/beman/task/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ target_sources(
${PROJECT_SOURCE_DIR}/include/beman/task/detail/final_awaiter.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/find_allocator.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/handle.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/inline_scheduler.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/into_optional.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/logger.hpp
${PROJECT_SOURCE_DIR}/include/beman/task/detail/poly.hpp
Expand Down
1 change: 0 additions & 1 deletion tests/beman/task/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set(task_tests
final_awaiter
find_allocator
handle
inline_scheduler
lazy
poly
promise_base
Expand Down
43 changes: 0 additions & 43 deletions tests/beman/task/inline_scheduler.test.cpp

This file was deleted.

5 changes: 2 additions & 3 deletions tests/beman/task/promise_base.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <beman/task/detail/promise_base.hpp>
#include <beman/task/detail/allocator_of.hpp>
#include <beman/task/detail/state_base.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/execution/execution.hpp>
#include <beman/execution/stop_token.hpp>
#ifdef NDEBUG
Expand Down Expand Up @@ -73,8 +72,8 @@ struct state : bt::state_base<T, env<E...>> {
this->got_environment = true;
return this->ev;
}
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }
};

template <typename T>
Expand Down
7 changes: 3 additions & 4 deletions tests/beman/task/promise_type.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <beman/task/detail/promise_type.hpp>
#include <beman/task/detail/allocator_of.hpp>
#include <beman/task/detail/task_scheduler.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/execution/execution.hpp>
#ifdef NDEBUG
#undef NDEBUG
Expand Down Expand Up @@ -158,10 +157,10 @@ struct test_task : beman::task::detail::state_base<int, environment> {
allocator_type do_get_allocator() override { return allocator_type{}; }
stop_token_type do_get_stop_token() override { return this->source.get_token(); }
environment& do_get_environment() override { return this->env; }
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }

beman::task::detail::task_scheduler scheduler{beman::task::detail::inline_scheduler{}};
beman::task::detail::task_scheduler scheduler{beman::execution::inline_scheduler{}};
beman::task::detail::task_scheduler query(beman::execution::get_scheduler_t) const noexcept {
return this->scheduler;
}
Expand Down
5 changes: 2 additions & 3 deletions tests/beman/task/scheduler_of.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <beman/task/detail/scheduler_of.hpp>
#include <beman/task/detail/task_scheduler.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <concepts>
#ifdef NDEBUG
#undef NDEBUG
Expand All @@ -16,7 +15,7 @@ namespace {
struct no_scheduler {};

struct defines_scheduler {
using scheduler_type = beman::task::detail::inline_scheduler;
using scheduler_type = beman::execution::inline_scheduler;
};

struct non_scheduler {};
Expand All @@ -29,6 +28,6 @@ int main() {
static_assert(
std::same_as<beman::task::detail::task_scheduler, beman::task::detail::scheduler_of_t<no_scheduler>>);
static_assert(
std::same_as<beman::task::detail::inline_scheduler, beman::task::detail::scheduler_of_t<defines_scheduler>>);
std::same_as<beman::execution::inline_scheduler, beman::task::detail::scheduler_of_t<defines_scheduler>>);
// using type = beman::task::detail::scheduler_of_t<defines_non_scheduler>;
}
7 changes: 4 additions & 3 deletions tests/beman/task/state_base.test.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// tests/beman/task/state_base.test.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/execution/execution.hpp>
#include <beman/task/detail/state_base.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/task/detail/allocator_of.hpp>
#ifdef NDEBUG
#undef NDEBUG
#endif
#include <cassert>

namespace ex = beman::execution;
namespace bt = beman::task::detail;

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -37,8 +38,8 @@ struct state : beman::task::detail::state_base<int, environment> {
this->got_environment = true;
return this->env;
}
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(bt::inline_scheduler()); }
auto do_get_scheduler() -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }
auto do_set_scheduler(scheduler_type) -> scheduler_type override { return scheduler_type(ex::inline_scheduler()); }
};
} // namespace

Expand Down
1 change: 0 additions & 1 deletion tests/beman/task/task_scheduler.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <beman/task/detail/task_scheduler.hpp>
#include <beman/task/detail/inline_scheduler.hpp>
#include <beman/execution/execution.hpp>
#include <beman/execution/stop_token.hpp>
#include <atomic>
Expand Down
Loading