book
book copied to clipboard
Update loop to Result: 10
trafficstars
Chapter 16-15 has drift between the book text and the code that this PR tries to address
- The current code print output is
Result: 9 - The text describes that the output should be
Result: 10
First time OS contribution attempt lol, so any critique and advice appreciated~
For reference the book text :
Listing 16-15: Using an Arc<T> to wrap the Mutex<T> to be able to share
ownership across multiple threads
This code will print the following:
Result: 10
We did it! We counted from 0 to 10, which may not seem very impressive, but it
did teach us a lot about Mutex<T> and thread safety ...