In /src/Step_2/ run make
. Executable will build as Lock.out. To run executable, run ./Lock.out
.
It produced this output, which matched expectations:
armaan@ubuntuVM:Step_2$ ./Lock.out
thread #3
thread #2
thread #1
- Pass: The test code performs the same with my namespace and class,
chal::LockGuard
, as it would withstd::lock_guard
. - Fail: Any other result.
The example I used from Step 1 is already threadable with 10 threads called, so I intend to take current LockGuard testbench and change it to 3 threads. See Reference in Appendix for details.
Implement c++11 threading example
2-3 threads running
Was initially uncertain about parsing prompt. Read ahead to Step 3 to illuminate requirments. Discussion in Appendix
Environment remains the same as the previous step.