随笔分类 - thread pool
摘要:java提供的线程池类架构图: 全参数构造方法 public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> wo
阅读全文
摘要:Condition接口通过ReentrantLock.newCondition获取ConditionObject实现类 方法说明 await:线程挂起LockSupport.park实现本地方法接口park signal:线程退出等待,LockSupport.unpark。 在研究Scheduled
阅读全文
摘要:看到alibaba的nacos注册中心中client端用这个作为心跳任务工具 BeatReactor类中 executorService spring 管理。 this.executorService = new ScheduledThreadPoolExecutor(threadCount, ne
阅读全文