Creating Your Own Runtime 260 ch10/a-rust-futures/src/runtime/reactor. rs use mio::{net::Tcp Stream, Events, Interest, Poll, Registry, Token}; use std::{ collections::Hash Map, sync::{ atomic::{Atomic Usize, Ordering}, Arc, Mutex, Once Lock, }, thread, task::{Context, Waker}, }; There are two minor changes we need to make. The first one is that our set_waker function now accepts Context from which it needs to get a Waker object: ch10/a-rust-futures/src/runtime/reactor. rs pub fn set_waker(&self, cx: &Context, id: usize) { let _ = self . wakers . lock() . map(|mut w| w. insert(id, cx. waker(). clone() ). is_none()) . unwrap(); } The last change is that we need to call a slightly different method when calling wake in the event_ loop function: ch10/a-rust-futures/src/runtime/reactor. rs if let Some(waker) = wakers. get(&id) { waker. wake_by_ref() ; } Since calling wake now consumes self, we call the version that takes &self instead since we want to hold on to that waker for later. That's it. Our runtime can now run and take advantage of the full power of asynchronous Rust. Let's try it out by typing cargo run in the terminal.