-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Description
- I have searched open and closed issues and pull requests for duplicates, using these search terms:
- lock counter
- I have checked the latest
main
branch to see if this has already been fixed, in this file:- src/ch16-03-shared-state.md
URL to the section(s) of the book with this problem:
https://doc.rust-lang.org/stable/book/ch16-03-shared-state.html#sharing-a-mutext-between-multiple-threads
Description of the problem:
The error message states that the counter value was moved in the previous iteration of the loop. Rust is telling us that we can’t move the ownership of lock counter into multiple threads.
Suggested fix:
Drop the "lock".
Metadata
Metadata
Assignees
Labels
No labels