some minor changes

This commit is contained in:
cfsamson
2020-02-05 16:45:03 +01:00
parent 6dd174c9e1
commit 4c51fba01a
3 changed files with 12 additions and 4 deletions

View File

@@ -569,7 +569,7 @@ fn main() {
# let handle = thread::spawn(move || {
# // This simulates some I/O resource
# for event in rx {
# println!("GOT EVENT: {:?}", event);
# println!("REACTOR: {:?}", event);
# let rl_clone = rl_clone.clone();
# match event {
# Event::Close => break,
@@ -622,6 +622,14 @@ fn main() {
# }
```
I added a debug printout of the events the reactor registered interest for so we can observe
two things:
1. How the `Waker` object looks just like the _trait object_ we talked about in an earlier chapter
2. In what order the events register interest with the reactor
The last point is relevant when we move on the the last paragraph.
## Async/Await and concurrent Futures
This is the first time we actually see the `async/await` syntax so let's
@@ -844,7 +852,7 @@ fn main() {
# let handle = thread::spawn(move || {
# // This simulates some I/O resource
# for event in rx {
# println!("GOT EVENT: {:?}", event);
# println!("REACTOR: {:?}", event);
# let rl_clone = rl_clone.clone();
# match event {
# Event::Close => break,