Skip to content

Conversation

@lukewagner
Copy link
Member

I realized that the current Python CABI definition ignores the case where a first {stream,future}.cancel-{read,write} blocked and then the component tries cancelling a second time. I think it should simply trap, so this PR adds a new CopyState to catch this case.

(I would have added a test to test/async/cancel-stream.wast, but it's currently only possible to hit using host powers (because cancellation never blocks in component-to-component cases). Once we add {stream,future}.read-complete, we'll be able to cause {stream,future}.cancel-write to block from within a pure component WAST, so I added a note to add a test then.)

Co-authored-by: Joel Dice <joel.dice@fermyon.com>
@lukewagner lukewagner merged commit 0b951b7 into main Jan 9, 2026
2 checks passed
@lukewagner lukewagner deleted the double-cancel branch January 9, 2026 17:29
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.

4 participants