Support cancellation of in-flight stack operations in the Automation API - #2246
Open
addu390 wants to merge 3 commits into
Open
Support cancellation of in-flight stack operations in the Automation API#2246addu390 wants to merge 3 commits into
addu390 wants to merge 3 commits into
Conversation
Contributor
Author
Frassle
reviewed
Jul 13, 2026
| private final Map<CancellationTokenRegistration, Runnable> registrations = new LinkedHashMap<>(); | ||
| private boolean cancellationRequested; | ||
|
|
||
| CancellationToken(boolean canceled) { |
Member
There was a problem hiding this comment.
This is only ever false? Probably just drop the parameter
| * {@link CancellationTokenSource}. | ||
| */ | ||
| public final class CancellationToken { | ||
| private static final CancellationToken NONE = new CancellationToken(false); |
Member
There was a problem hiding this comment.
This will accumulate registrations forever, that might be a memory leak that matters.
Contributor
Author
There was a problem hiding this comment.
Moved the cancellation state into CancellationTokenSource so the shared none() token no longer stores registrations.
addu390
force-pushed
the
feature/java-cancel-stack-automation-api
branch
from
July 13, 2026 23:35
3c97214 to
ea4131a
Compare
Contributor
Author
|
Hi @Frassle |
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.
No description provided.