File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
compio-runtime/src/runtime Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,15 @@ impl<T: OpCode + 'static> Future for Submit<T, Extra> {
146146 let this = unsafe { self . get_unchecked_mut ( ) } ;
147147 loop {
148148 match this. state . take ( ) . expect ( "Cannot poll after ready" ) {
149- State :: Submitted { key, .. } => match this. runtime . poll_task_with_extra ( cx, key) {
150- PushEntry :: Pending ( key) => {
151- this. state = Some ( State :: submitted ( key) ) ;
152- return Poll :: Pending ;
149+ State :: Submitted { key, .. } => {
150+ match this. runtime . poll_task_with_extra ( cx. waker ( ) , key) {
151+ PushEntry :: Pending ( key) => {
152+ this. state = Some ( State :: submitted ( key) ) ;
153+ return Poll :: Pending ;
154+ }
155+ PushEntry :: Ready ( res) => return Poll :: Ready ( res) ,
153156 }
154- PushEntry :: Ready ( res) => return Poll :: Ready ( res) ,
155- } ,
157+ }
156158 State :: Idle { op } => {
157159 let extra = cx. as_extra ( || this. runtime . default_extra ( ) ) ;
158160 match this. runtime . submit_raw ( op, extra) {
Original file line number Diff line number Diff line change @@ -316,13 +316,13 @@ impl Runtime {
316316
317317 pub ( crate ) fn poll_task_with_extra < T : OpCode > (
318318 & self ,
319- cx : & mut Context ,
319+ waker : & Waker ,
320320 key : Key < T > ,
321321 ) -> PushEntry < Key < T > , ( BufResult < usize , T > , Extra ) > {
322322 instrument ! ( compio_log:: Level :: DEBUG , "poll_task_with_extra" , ?key) ;
323323 let mut driver = self . driver . borrow_mut ( ) ;
324324 driver. pop_with_extra ( key) . map_pending ( |mut k| {
325- driver. update_waker ( & mut k, cx . waker ( ) ) ;
325+ driver. update_waker ( & mut k, waker) ;
326326 k
327327 } )
328328 }
You can’t perform that action at this time.
0 commit comments