Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/wasmtime/src/runtime/component/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,10 @@ impl ComponentInstance {
// Started, but not yet returned or cancelled; send the
// `CANCELLED` event
task.cancel_sent = true;
assert!(task.event.is_none());
// Note that this might overwrite an event that was set earlier
// (e.g. `Event::None` if the task is yielding, or
// `Event::Cancelled` if it was already cancelled), but that's
// okay -- this should supersede the previous state.
task.event = Some(Event::Cancelled);
if let Some(set) = task.waiting_on.take() {
let item = match self.get_mut(set)?.waiting.remove(&guest_task).unwrap() {
Expand Down