Skip to content

Commit 2321e82

Browse files
Reword 'static issues. Closes mainmatter#117
1 parent 5c8edf6 commit 2321e82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/src/07_threads/10_patch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ In the non-threaded version of the system, updates were fairly straightforward:
1010

1111
## Multithreaded updates
1212

13-
The same strategy won't work in the current multi-threaded version,
14-
because the mutable reference would have to be sent over a channel. The borrow checker would
15-
stop us, because `&mut Ticket` doesn't satisfy the `'static` lifetime requirement of `SyncSender::send`.
13+
The same strategy won't work in the current multithreaded version. The borrow checker would
14+
stop us: `SyncSender<&mut Ticket>` isn't `'static` because `&mut Ticket` doesn't satisfy the `'static` lifetime, therefore
15+
they can't be captured by the closure that gets passed to `std::thread::spawn`.
1616

1717
There are a few ways to work around this limitation. We'll explore a few of them in the following exercises.
1818

0 commit comments

Comments
 (0)