-
package bingFaBianCheng17; import java.sql.Connection; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; public class test8 { static boolean a = false; static boolean b = false; static boolean c = false; public static void main(String[] args) throws InterruptedException { ReentrantLock lock = new ReentrantLock(); Condition c1 = lock.newCondition(); Condition c2 = lock.newCondition(); Condition c3 = lock.newCondition(); AtomicInteger ai= new AtomicInteger(0); AtomicInteger bi = new AtomicInteger(0); AtomicInteger ci = new AtomicInteger(0); Thread A =
阿里面试题多线程打印问题
最新推荐文章于 2021-05-17 14:56:45 发布