Skip to content

Commit

Permalink
Ch. 17: Add a new §05 on Stream and AsyncIterator
Browse files Browse the repository at this point in the history
This pushes back the Tasks, Futures, and Threads discussion one more
spot, to become §06.
  • Loading branch information
chriskrycho committed Jun 17, 2024
1 parent c0c24e2 commit 74df84e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 103 deletions.
3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@
- [Concurrency With Async](ch17-02-concurrency-with-async.md)
- [Working With More Futures](ch17-03-more-futures.md)
- [More Ways of Combining Futures](ch17-04-more-ways-of-combining-futures.md)
- [Futures, Tasks, and Threads](ch17-05-futures-tasks-threads.md)
- [Streams and Async Iterators](ch17-05-streams-async-iterators.md)
- [Futures, Tasks, and Threads](ch17-06-futures-tasks-threads.md)

- [Object Oriented Programming Features of Rust](ch18-00-oop.md)
- [Characteristics of Object-Oriented Languages](ch18-01-what-is-oo.md)
Expand Down
2 changes: 2 additions & 0 deletions src/ch17-04-more-ways-of-combining-futures.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,6 @@ example, you can use this same approach to combine timeouts with retries, and
in turn use those with things like network calls—the exact example we started
out with at the beginning of the chapter!

Up next, let’s look at how we can work with *sequences* of futures.

[futures]: ch17-01-futures-and-syntax.html#what-are-futures
102 changes: 0 additions & 102 deletions src/ch17-05-futures-tasks-threads.md

This file was deleted.

13 changes: 13 additions & 0 deletions src/ch17-05-streams-async-iterators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Streams and Async Iterators

<!--
- Motivation: you can do a lot with `while let` but it would be nice to be able
to use `for` loops, even `async for`. (But we don’t get those from the
ecosystem traits… so maybe only call them out in a `Note: …` context?)
- The basic API, with `poll_next()`, plus the “surface” syntax, `.next().await`.
- How to use it, with a worked example from .
-->
1 change: 1 addition & 0 deletions src/ch17-06-futures-tasks-threads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Futures, Tasks, and Threads

0 comments on commit 74df84e

Please sign in to comment.