dev_tools
Interviewer: Please use five methods to achieve multi-threaded alternate printing questions
Three threads T1, T2, T3, how to make them execute in order? This is a concurrent programming code question often tested in interviews. Similar questions are: Three threads T1, T2, T3 print ABC in turn, printing n times, such as ABCABCABCABC... Two threads alternately print odd and even numbers from 1-100 N threads cyclically print 1-100 ...... In fact, this kind of problem is essentially a thread communication problem. The idea is basically that one thread finishes execution, blocks the thread,