zoukankan      html  css  js  c++  java
  • ScheduledThreadPoolExecutor

    1、

    2、ScheduledThreadPoolExecutor和Timer类似,可以设定一段时间delay之后或者按照一定的rate来执行任务。

    3、ScheduledThreadPoolExecutor继承自ThreadPoolExecutor,但是ThreadPoolExecutor的一些API对ScheduledThreadPoolExecutor是无效的,因为ScheduledThreadPoolExecutor本质上是一个只有coreSize大小的而且BlockingQueue为inbound的一个线程池。

    a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments tomaximumPoolSize have no useful effect. Additionally, it is almost never a good idea to set corePoolSize to zero or use allowCoreThreadTimeOut because this may leave the pool without threads to handle tasks once they become eligible to run.

  • 相关阅读:
    Django组件之contenttype
    DRF 分页
    DRF的解析器和渲染器
    DRF 权限 频率
    DRF 版本 认证
    django Rest Framework 视图和路由
    Serialzers 序列化组件
    FBV和CBV区别
    RESTful规范
    SecureCRT最佳配置方案
  • 原文地址:https://www.cnblogs.com/YDDMAX/p/5208497.html
Copyright © 2011-2022 走看看