Home > Back-end >  Multithreading issues
Multithreading issues

Time:10-07

Java2 threads run at the same time, when you need a thread result as another thread start conditions, how to implement,
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.html

CodePudding 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, lock
The activation of the thread problem LS posts made it very clear, a.
  •  Tags:  
  • J2ME
  • Related