File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
crates/symmetric_executor/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,15 @@ impl symmetric_executor::Guest for Guest {
8989 callback : symmetric_executor:: CallbackFunction ,
9090 data : symmetric_executor:: CallbackData ,
9191 ) -> ( ) {
92- let mut subscr = unsafe { * ( trigger. take_handle ( ) as * mut EventSubscription ) } ;
92+ // TODO: Tidy this mess up
93+ let mut subscr = EventSubscription {
94+ inner : EventType :: SystemTime ( std:: time:: UNIX_EPOCH ) ,
95+ callback : None ,
96+ } ;
97+ std:: mem:: swap ( & mut subscr, unsafe {
98+ & mut * ( trigger. take_handle ( ) as * mut EventSubscription )
99+ } ) ;
93100 let cb: fn ( * mut ( ) ) -> CallbackState = unsafe { transmute ( callback. take_handle ( ) ) } ;
94- // let data = data.take_handle() as *mut ();
95101 subscr. callback . replace ( ( cb, data) ) ;
96102 EXECUTOR . lock ( ) . unwrap ( ) . active_tasks . push ( subscr) ;
97103 }
You can’t perform that action at this time.
0 commit comments