Introduction - If you have any usage issues, please Google them yourself
With regard to the issue of thread synchronization. Including the mutex to create chaos, as well as programs, Peterson algorithm program two options to solve the problem. Oh, can refer to.