Skip to content

Commit 91343fc

Browse files
authored
Merge pull request #253 from nrc/pin
Pinning chapter
2 parents 97ffb24 + c1ee53f commit 91343fc

File tree

8 files changed

+346
-685
lines changed

8 files changed

+346
-685
lines changed

book.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[book]
22
title = "Asynchronous Programming in Rust"
3-
authors = ["Taylor Cramer"]
3+
authors = ["Taylor Cramer", "Nicholas Cameron", "Open source contributors"]
44

55
[build]
66
create-missing = false
@@ -12,3 +12,4 @@ site-url = "/async-book/"
1212
[output.linkcheck]
1313
follow-web-links = true
1414
traverse-parent-directories = false
15+
exclude = [ 'blog\.cloudflare\.com' ]

src/02_execution/02_future.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ real `Future` trait and how it is different.
6161
```
6262

6363
The first change you'll notice is that our `self` type is no longer `&mut Self`,
64-
but has changed to `Pin<&mut Self>`. We'll talk more about pinning in [a later
65-
section][pinning], but for now know that it allows us to create futures that
64+
but has changed to `Pin<&mut Self>`. We'll talk more about pinning in a later
65+
section, but for now know that it allows us to create futures that
6666
are immovable. Immovable objects can store pointers between their fields,
6767
e.g. `struct MyFut { a: i32, ptr_to_a: *const i32 }`. Pinning is necessary
6868
to enable async/await.
@@ -76,5 +76,3 @@ In a real-world scenario, a complex application like a web server may have
7676
thousands of different connections whose wakeups should all be
7777
managed separately. The `Context` type solves this by providing access to
7878
a value of type `Waker`, which can be used to wake up a specific task.
79-
80-
[pinning]: ../04_pinning/01_chapter.md

0 commit comments

Comments
 (0)