File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 4949 res
5050}
5151
52+ /// This waker is used in the Context of block_on. If a Future executing in
53+ /// the block_on calls context.wake(), it sets this boolean state so that
54+ /// block_on's Future is polled again immediately, rather than waiting for
55+ /// an external (WASI pollable) event before polling again.
5256struct RootWaker {
5357 wake : AtomicBool ,
5458}
Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ mod test {
281281 let later = wasi:: clocks:: monotonic_clock:: subscribe_duration ( LONG_DURATION ) ;
282282 let later = reactor. schedule ( later) ;
283283 let mut polled_before = false ;
284+ // This is basically futures_lite::future::yield_now, except with a boolean
285+ // `polled_before` so we can definitively observe what happened
284286 let wasi_independent_future = futures_lite:: future:: poll_fn ( |cx| {
285287 if polled_before {
286288 std:: task:: Poll :: Ready ( true )
You can’t perform that action at this time.
0 commit comments