Skip to content

Cancellation semantics + signal map recfactoring#430

Open
devhawk wants to merge 10 commits into
mainfrom
devhawk/signal-map
Open

Cancellation semantics + signal map recfactoring#430
devhawk wants to merge 10 commits into
mainfrom
devhawk/signal-map

Conversation

@devhawk

@devhawk devhawk commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Added cancellation checks in recv and getEvent .

Alligned cancelation semantics to TS/Python. WorkflowCancelled is thrown inside the running workflow to abort it. AwaitedWorkflowCancelled is thrown to external callers requesting a result.

Simplied SignalMap, removed generic argument in favor of String and removed WakeReason.

fixes #414

@devhawk devhawk requested review from kraftp, maxdml and qianl15 June 11, 2026 23:18
Comment thread transact/src/main/java/dev/dbos/transact/execution/DBOSExecutor.java Outdated

// Blocks until the workflow task actually exits, proving the recv loop detected the
// cancellation and the workflow thread terminated — not just that the DB was updated.
assertThrows(DBOSAwaitedWorkflowCancelledException.class, handle::getResult);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should also assert the workflow completes (getResult on the original handle) in reasonable time.

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.

Improve Cancellation Semantics

2 participants