3e6a8cfbdb
I've seen from a cursory glance on the repo that a lot of people struggle with this problem set because of the ambiguity in the instructions (See issues #287, #743, #567). I'd like to recommend perhaps putting a TODO on the lines that need changing to stop people from falling down rabbit holes and pursuing completely different solution to the exercise that avoids the core pedagogical content of the problem, which is an understanding of how Arc is an atomic reference counting primitive that relies on .lock() and .unwrap() to solve shared state concurrency problems with the Mutex primitive. I've also added comments in the instructions to highlight why it is that the solution is solved when the program prints the counter to the screen 6 times, as this was unclear and was distracting students from the core takeaway of the exercise. |
||
---|---|---|
.. | ||
README.md | ||
threads1.rs |
Threads
In most current operating systems, an executed program’s code is run in a process, and the operating system manages multiple processes at once. Within your program, you can also have independent parts that run simultaneously. The features that run these independent parts are called threads.