File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ impl<TaskId: TaskIdType> TaskScheduler<TaskId> {
3737 self . inner . lock ( ) . unwrap ( ) . poll_resume ( cx, task_id, weight)
3838 }
3939
40+ pub fn reset ( & self , task_id : & TaskId ) {
41+ self . exit ( task_id)
42+ }
43+
4044 pub fn exit ( & self , task_id : & TaskId ) {
4145 self . inner . lock ( ) . unwrap ( ) . exit ( task_id)
4246 }
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ pub struct WasmRun {
2424
2525impl Drop for WasmRun {
2626 fn drop ( & mut self ) {
27- self . env . cleanup ( )
27+ self . env . cleanup ( ) ;
28+ self . scheduler . exit ( & self . id ) ;
2829 }
2930}
3031
@@ -73,6 +74,7 @@ impl WasmRun {
7374 env. set_instance ( instance) ;
7475 env. set_gas_per_breath ( gas_per_breath) ;
7576 env. set_weight ( weight) ;
77+ scheduler. reset ( & id) ;
7678 Ok ( (
7779 WasmRun {
7880 env : env. clone ( ) ,
You can’t perform that action at this time.
0 commit comments