Generalize out Cancellation#2
Merged
Merged
Conversation
micromho
force-pushed
the
nausicaa/graceful-stop
branch
from
May 20, 2026 01:46
f28494b to
4d3bd7d
Compare
glittershark
force-pushed
the
aspen/cancellation
branch
from
May 20, 2026 01:49
2b77fd5 to
9124506
Compare
micromho
force-pushed
the
nausicaa/graceful-stop
branch
from
May 20, 2026 01:52
4d3bd7d to
4b19fe9
Compare
glittershark
force-pushed
the
aspen/cancellation
branch
from
May 20, 2026 01:54
9124506 to
d19eb6e
Compare
micromho
approved these changes
May 20, 2026
Contributor
|
👍 |
glittershark
force-pushed
the
aspen/cancellation
branch
2 times, most recently
from
May 20, 2026 02:01
b19ff8b to
7d1e279
Compare
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
force-pushed
the
aspen/cancellation
branch
from
May 20, 2026 02:02
7d1e279 to
43fea86
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.