Skip to content

Fix get start scheduler#102

Merged
dietmarkuehl merged 4 commits into
mainfrom
fix-get_start_scheduler
Jul 19, 2026
Merged

Fix get start scheduler#102
dietmarkuehl merged 4 commits into
mainfrom
fix-get_start_scheduler

Conversation

@dietmarkuehl

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 19, 2026 16:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the task implementation and tests to use get_start_scheduler / set_start_scheduler semantics (and related CPOs) instead of the prior get_scheduler / set_scheduler plumbing, aligning scheduler propagation and environment querying with “start scheduler” terminology.

Changes:

  • Renamed state_base scheduler accessors/virtuals from *_scheduler to *_start_scheduler, updating derived implementations accordingly.
  • Updated promise/environment plumbing to expose the promise’s start scheduler through get_start_scheduler (and updated tests to query get_start_scheduler).
  • Updated awaiter rescheduling logic and tests to use get_start_scheduler-based queries.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/beman/task/task.test.cpp Updates scheduler affinity test to read get_start_scheduler.
tests/beman/task/state_base.test.cpp Updates state_base test overrides to do_get_start_scheduler / do_set_start_scheduler.
tests/beman/task/promise_type.test.cpp Updates test state overrides and query to get_start_scheduler_t.
tests/beman/task/promise_base.test.cpp Updates test state overrides to do_get_start_scheduler / do_set_start_scheduler.
include/beman/task/detail/state.hpp Renames scheduler virtual overrides to start-scheduler variants in the concrete state.
include/beman/task/detail/state_base.hpp Renames public/virtual scheduler API to get_start_scheduler/set_start_scheduler and prefers start scheduler in from_env() with fallback to get_scheduler.
include/beman/task/detail/promise_type.hpp Routes scheduler changes/reads through set_start_scheduler / get_start_scheduler.
include/beman/task/detail/promise_env.hpp Updates environment queries to return the promise’s start scheduler.
include/beman/task/detail/awaiter.hpp Switches awaiter rescheduling to use get_start_scheduler queries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 25 to 29
template <typename Awaiter,
typename ParentPromise,
bool =
requires(const ParentPromise& p) { ::beman::execution::get_scheduler(::beman::execution::get_env(p)); }>
bool = requires(
const ParentPromise& p) { ::beman::execution::get_start_scheduler(::beman::execution::get_env(p)); }>
struct awaiter_op_t {
Comment on lines 75 to 81
if constexpr (requires {
*this->scheduler !=
::beman::execution::get_scheduler(::beman::execution::get_env(this->parent.promise()));
*this->scheduler != ::beman::execution::get_start_scheduler(
::beman::execution::get_env(this->parent.promise()));
}) {
if (*this->scheduler !=
::beman::execution::get_scheduler(::beman::execution::get_env(this->parent.promise()))) {
::beman::execution::get_start_scheduler(::beman::execution::get_env(this->parent.promise()))) {
this->reschedule.emplace(this->parent.promise(), this);
@coveralls

coveralls commented Jul 19, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.248%. remained the same — fix-get_start_scheduler into main

@dietmarkuehl
dietmarkuehl merged commit 03895c7 into main Jul 19, 2026
36 checks passed
@dietmarkuehl
dietmarkuehl deleted the fix-get_start_scheduler branch July 19, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants