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

Commit cc0e9a4

Browse files
committed
update ConcurrentState::drop_fibers to match new code
`StoreFiber`s are now stored in a few other places besides `ConcurrentState::table`, so we need to clear those out as well. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent ef11ee9 commit cc0e9a4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

crates/wasmtime/src/runtime/component/concurrent.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,8 +2319,9 @@ impl Instance {
23192319
/// `LinkerInstance::func_wrap_concurrent` are always polled as part of the
23202320
/// event loop, so this function is not needed in that case. However,
23212321
/// top-level code which needs to poll `Future`s involving concurrent tasks
2322-
/// must use either this function, `Instance::with`, or `Instance::spawn` to
2323-
/// ensure they are polled as part of the correct event loop.
2322+
/// must use either this function, `Instance::run_with`, or
2323+
/// `Instance::spawn` to ensure they are polled as part of the correct event
2324+
/// loop.
23242325
///
23252326
/// Consider the following examples:
23262327
///
@@ -3609,6 +3610,9 @@ impl ConcurrentState {
36093610

36103611
pub fn drop_fibers(&mut self) {
36113612
self.table = Table::new();
3613+
self.worker = None;
3614+
self.high_priority = Vec::new();
3615+
self.low_priority = Vec::new();
36123616
}
36133617
}
36143618

0 commit comments

Comments
 (0)