File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ impl WasmRuntimeAsyncEngine {
7575 }
7676}
7777
78+
79+ pub fn next_id ( )
80+ {
81+
82+ }
7883struct FutureWaker ( Sender < ( ) > ) ;
7984
8085impl FutureWaker {
@@ -91,7 +96,7 @@ impl Wake for FutureWaker {
9196
9297#[ cfg( test) ]
9398mod test {
94-
99+
95100 use super :: * ;
96101 use std:: future:: Future ;
97102
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ impl<'a> Future for ConnectionFuture<'a> {
155155 type Output = IOResult < ( ) > ;
156156 fn poll (
157157 self : std:: pin:: Pin < & mut Self > ,
158- _ : & mut std:: task:: Context < ' _ > ,
158+ cx : & mut std:: task:: Context < ' _ > ,
159159 ) -> std:: task:: Poll < Self :: Output > {
160160 let this = self . get_mut ( ) ;
161161 if !REACTOR . lock ( ) . unwrap ( ) . is_pollable ( & this. async_key ) {
@@ -172,6 +172,7 @@ impl<'a> Future for ConnectionFuture<'a> {
172172 this. stream . finish_connecting ( ) ?;
173173 Poll :: Ready ( Ok ( ( ) ) )
174174 } else {
175+ cx. waker ( ) . wake_by_ref ( ) ;
175176 Poll :: Pending
176177 }
177178 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl Future for TimeoutFuture {
5555 type Output = ( ) ;
5656 fn poll (
5757 self : std:: pin:: Pin < & mut Self > ,
58- _ : & mut std:: task:: Context < ' _ > ,
58+ cx : & mut std:: task:: Context < ' _ > ,
5959 ) -> std:: task:: Poll < Self :: Output > {
6060 let has_elapsed = TIMERS
6161 . get ( & self . id )
@@ -64,6 +64,7 @@ impl Future for TimeoutFuture {
6464 if has_elapsed {
6565 return std:: task:: Poll :: Ready ( ( ) ) ;
6666 }
67+ cx. waker ( ) . wake_by_ref ( ) ;
6768 std:: task:: Poll :: Pending
6869 }
6970}
Original file line number Diff line number Diff line change 1- use std:: {
2- collections:: HashMap ,
3- sync:: Arc ,
4- } ;
1+ use std:: { collections:: HashMap , sync:: Arc } ;
52
63use crate :: bindings:: wasi:: io:: poll:: { poll, Pollable } ;
74
@@ -49,4 +46,3 @@ impl PollTasks {
4946 }
5047 }
5148}
52-
You can’t perform that action at this time.
0 commit comments