Such as A car as A thread, traffic lights as thread B, both run at the same time, but when A walk to the traffic light intersection, need thread B as A result, to make A continues to run,
CodePudding user response:
https://www.cnblogs.com/lixin-link/p/10998058.htmlCodePudding user response:
If it is completely simulate real driving state, should be the automobile (group) the polling thread state of traffic lights, then need to add and subtract, lockThe activation of the thread problem LS posts made it very clear, a.