//当前电影票余量
private static int currentTickets = 30;
//加锁确保多线程场景下的线程安全
private static Lock lock = new ReentrantLock();
public static void main(String[] args) {
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(3,5,5,TimeUnit.MINUTES,
new ArrayBlockingQueue(5));
for (int i = 0; i <40 ; i++) {
Future