Skip to content

Make Goal code use abstractions over interations with Worker#12697

Merged
mergify[bot] merged 1 commit intomasterfrom
worker-abstraction
Mar 21, 2025
Merged

Make Goal code use abstractions over interations with Worker#12697
mergify[bot] merged 1 commit intomasterfrom
worker-abstraction

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

Motivation

I didn't write this, @L-as did. I just rebased it.

Instead of calling worker.waitForAWhile(shared_from_this()) etc., the subclasses of Goal instead call protected functions defined in Goal that abstract over these.

The code for awaiting has also been heavily simplified. Instead of calling addWaitee, then suspending,
co_await await(waitees) is called once, which also handles the suspend.

The end-goal is to remove all manual co_await Suspend{}s.

Context

It's the first commit of #12668. I am pulling commits from there and my #12663 in "order of least controversy". The overall goal is #12628.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Instead of calling `worker.waitForAWhile(shared_from_this())` etc.,
the subclasses of Goal instead call protected functions defined in Goal
that abstract over these.

The code for awaiting has also been heavily simplified.
Instead of calling `addWaitee`, then suspending,
`co_await await(waitees)` is called once, which also handles the suspend.

The end-goal is to remove all manual `co_await Suspend{}`s.
Copy link
Copy Markdown
Member Author

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

I think this is good

@L-as
Copy link
Copy Markdown
Member

L-as commented Mar 20, 2025

LGTM

@Mic92
Copy link
Copy Markdown
Member

Mic92 commented Mar 21, 2025

@mergify queue

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 21, 2025

queue

✅ The pull request has been merged automatically

Details

The pull request has been merged automatically at f0b7b37

mergify bot added a commit that referenced this pull request Mar 21, 2025
@mergify mergify bot merged commit f0b7b37 into master Mar 21, 2025
26 checks passed
@mergify mergify bot deleted the worker-abstraction branch March 21, 2025 10:38
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