File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
crates/base/src/rt_worker Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ pub fn create_supervisor(
141
141
142
142
// we assert supervisor is only run for user workers
143
143
let conf = worker_runtime. conf . as_user_worker ( ) . unwrap ( ) . clone ( ) ;
144
+ let is_termination_requested = worker_runtime. is_termination_requested . clone ( ) ;
144
145
let cancel = cancel. clone ( ) ;
145
146
146
147
worker_runtime. js_runtime . add_near_heap_limit_callback ( move |cur, _| {
@@ -207,6 +208,8 @@ pub fn create_supervisor(
207
208
cancel. notify_waiters ( ) ;
208
209
}
209
210
211
+ is_termination_requested. raise ( ) ;
212
+
210
213
// NOTE: If we issue a hard CPU time limit, It's OK because it is
211
214
// still possible the worker's context is in the v8 event loop. The
212
215
// interrupt callback would be invoked from the V8 engine
You can’t perform that action at this time.
0 commit comments