Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

various fixes related to stream/future cancellation#89

Merged
dicej merged 1 commit intomainfrom
stream-future-cancel-fixes
Mar 28, 2025
Merged

various fixes related to stream/future cancellation#89
dicej merged 1 commit intomainfrom
stream-future-cancel-fixes

Conversation

@dicej
Copy link
Copy Markdown
Collaborator

@dicej dicej commented Mar 28, 2025

Most of this is related to the delay between queuing an event (e.g. read completion) and delivering it; a guest could cancel inbetween, and we should allow that rather than trap.

Also, we need to be careful to invalidate any queued events as part of cancellation, especially given that the guest could cancel and close a stream or future before delivery.

This code is getting uglier with time and will likely need to be cleaned up and refactored before it is upstreamed.

Fixes #84

Most of this is related to the delay between queuing an event (e.g. read
completion) and delivering it; a guest could cancel inbetween, and we should
allow that rather than trap.

Also, we need to be careful to invalidate any queued events as part of
cancellation, especially given that the guest could cancel and close a stream or
future before delivery.

This code is getting uglier with time and will likely need to be cleaned up and
refactored before it is upstreamed.

Fixes #84

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej enabled auto-merge March 28, 2025 02:30
@dicej dicej added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 26e299f Mar 28, 2025
42 checks passed
@dicej dicej deleted the stream-future-cancel-fixes branch March 31, 2025 20:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

guest traps with "stream or future read canceled when no read is pending"

1 participant