- Write function
waker_fn which “converts a closure into a Waker”.
- Write function
waker_unpark which creates a waker. The waker unparks a
given thread when waking.
- Write function
block_on which “blocks the current thread on a future”.
- Rewrite
Recv to support the Waker pattern. Name the new struct
RecvWithWaker.
- Rewrite “reactor-hello” using
RecvWithWaker and block_on.
- See examples/src/waker_fn.rs
- See examples/src/block_on.rs
- See examples/src/block_on.rs
- See examples/src/recv_with_waker.rs
- See examples/src/bin/block-on-hello.rs