Java线程锁
锁的本质是对于系统资源的锁定占有和释放,以此来控制代码在多线程模式下的执行顺序BlockingQueue 阻塞队列实现,有点类似于SemaphoreBlockingQueue foo = new BlockingQueue(1);BlockingQueue bar = new BlockingQue
锁的本质是对于系统资源的锁定占有和释放,以此来控制代码在多线程模式下的执行顺序BlockingQueue 阻塞队列实现,有点类似于SemaphoreBlockingQueue foo = new BlockingQueue(1);BlockingQueue bar = new BlockingQue