摘要:
Java常用阻塞队列 ArrayBlockingQueue 内部由一个固定长度的数组来实现阻塞队列 /** The queued items */ final Object[] items; /** items index for next take, poll, peek or remove */ 阅读全文
摘要:
首先我们知道启动一个线程都是通过调用Thread类的start()来开启一个新线程,那么我们就来一起看看Thread类的start()方法源码: /** * Causes this thread to begin execution; the Java Virtual Machine * calls 阅读全文
摘要:
//一个请假请求 public class LeaveRequest { private int leaveDays; private String name; public void leave(){ System.out.println("走完了流程都没人处理我"); } //省略getter、 阅读全文