Home > Back-end >  The 2020-12-18: Java and go, concurrency control has several ways?
The 2020-12-18: Java and go, concurrency control has several ways?

Time:12-19

The 2020-12-18: Java and go, concurrency control has several ways? # # f greatly architects a daily topic

CodePudding user response:

Java: CountDownLatch, CyclicBarrier, Semaphore, Exchanger, Lock, Synchronized
Go: WaitGroup, Channel, Context,

CodePudding user response:

Java has: use locking (Synchronized, already), semaphores (Semaphore), atomic classes (atomicInteger)
The language is WaitGroup respectively, the channel and the Context
  • Related