CodePudding user response:
Java: CountDownLatch, CyclicBarrier, Semaphore, Exchanger, Lock, SynchronizedGo: 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