Skip to content

Generalize out Cancellation#2

Merged
glittershark merged 1 commit into
mainfrom
aspen/cancellation
May 20, 2026
Merged

Generalize out Cancellation#2
glittershark merged 1 commit into
mainfrom
aspen/cancellation

Conversation

@glittershark

Copy link
Copy Markdown
Contributor

Generalize out the "select over doing a thing, or getting cancelled"
pattern into a new Cancellation struct (with corresponding Sender and
Receiver), which wraps the underlying watch but provides more
semantically "cancellationey" functions.

I originally tried to make this more semantically pure (omitting
CommandId) but I want to make the minimal change that works; perhaps
down the line I'll refactor even harder.

@glittershark
glittershark requested a review from micromho May 20, 2026 01:45
@micromho
micromho force-pushed the nausicaa/graceful-stop branch from f28494b to 4d3bd7d Compare May 20, 2026 01:46
@micromho
micromho force-pushed the nausicaa/graceful-stop branch from 4d3bd7d to 4b19fe9 Compare May 20, 2026 01:52
@micromho

Copy link
Copy Markdown
Contributor

👍

Base automatically changed from nausicaa/graceful-stop to main May 20, 2026 01:59
@glittershark
glittershark force-pushed the aspen/cancellation branch 2 times, most recently from b19ff8b to 7d1e279 Compare May 20, 2026 02:01
Generalize out the "select over doing a thing, or getting cancelled"
pattern into a new Cancellation struct (with corresponding Sender and
Receiver), which wraps the underlying watch but provides more
semantically "cancellationey" functions.

I originally tried to make this more semantically pure (omitting
CommandId) but I want to make the minimal change that works; perhaps
down the line I'll refactor even harder.
@glittershark
glittershark merged commit 8d41260 into main May 20, 2026
4 checks passed
@glittershark
glittershark deleted the aspen/cancellation branch May 20, 2026 02:03
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.

2 participants