Repository navigation
Conversation
| let mut javascript = JavascriptExecutionEngine::new(process_runtime); | ||
| javascript.set_event_notify(Some(Arc::clone(&event_notify))); | ||
| let mut python = PythonExecutionEngine::new(runtime.clone()); | ||
| let mut python = PythonExecutionEngine::new(vm_runtime.clone()); |
There was a problem hiding this comment.
🔴 High · Python can still bind the global timer wheel to one VM
PythonExecutionEngine::new(vm_runtime.clone()) constructs its embedded JavascriptExecutionEngine with this VM-scoped context. Python executions are ultimately started through that engine, whose LocalBridgeState passes the engine context to TimerWheel::get; if Python is the first runtime to schedule a JS/bridge timer, the process-global wheel is therefore still spawned under this VM's admission scope and dies when the VM is disposed, leaving later VMs with the same dead singleton. WasmExecutionEngine::new(vm_runtime) on the next line has the same path. Give both wrapper engines the process runtime for their embedded JavaScript host while retaining the VM runtime for guest execution, and cover first-use through Python/Wasm before disposing the VM.
f26c94d to
e5aa7f3
Compare
fetch()whose response body is fully consumed, then require VM disposal before the 5-second shutdown deadline.mainafter upstream commita6c668cmade timer-wheel initialization process-owned.Related: #1989
This covers the completed-response disposal path. The unread-response evaluation delay needs separate investigation.