Skip to content

Commit ef49016

Browse files
committed
README.md: Mention examples from the Asynchronous Programming chapter.
1 parent e4470d3 commit ef49016

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ terms of the MIT license. See [LICENSE-MIT](LICENSE-MIT) for details.
101101

102102
## Chapter 20: Asynchronous Programming
103103

104+
- The `cheapo-request` directory uses `async-std`'s asynchronous networking
105+
functions and the `block_on` executor function to make a bare-bones HTTP
106+
request.
107+
108+
- The `many-requests` directory makes several requests concurrently on a single
109+
thread, using `async-std`'s `spawn_local`.
110+
111+
- The `many-requests-surf` directory does the same using `surf`, an open-source
112+
asynchronous HTTP client library available from _crates.io_ that does a
113+
much better job with HTTP than our chapter's `cheapo_request` function.
114+
115+
- The `spawn-blocking` directory includes the definition of `spawn_blocking`
116+
presented in the section "Primitive Futures and Executors: When Is A Future
117+
Worth Polling Again?". The crate also includes some tests to exercise the
118+
function.
119+
120+
- The `block-on` directory includes the implementation of a simple `block_on`
121+
executor, which demonstrates polling and waiting for wakers to be invoked.
122+
104123
- The chat client and server used as an extended example are in their own
105124
repository, at `https://github.com/ProgrammingRust/async-chat`.
106125

0 commit comments

Comments
 (0)