Creating Your Own Runtime 256 continue; } Err(e) if e. kind() == Error Kind::Would Block => { // always store the last given Waker runtime::reactor(). set_waker(cx, self. id); break Poll::Pending ; } Err(e) => panic!("{e:?}"), } } That's it for this file. Not bad, huh? Let's take a look at what we need to change in our executor and open executor. rs. executor. rs The first thing we need to change in executor. rs is our dependencies. This time, we only rely on types from the standard library, and our dependencies section should now look like this: ch10/a-rust-futures/src/runtime/executor. rs use std::{ cell::{Cell, Ref Cell}, collections::Hash Map, future::Future, pin::Pin, sync::{Arc, Mutex}, task::{Poll, Context, Wake, Waker}, thread::{self, Thread}, }; Our coroutines will no longer be limited to only output String, so we can safely use a more sensible Output type for our top-level futures: ch10/a-rust-futures/src/runtime/executor. rs type Task = Pin<Box<dyn Future<Output = ()>>>; The next thing we'll dive straight into is Waker since the changes we make here will result in several other changes to this file.