zoukankan      html  css  js  c++  java
  • java多线程---------java.util.concurrent并发包----------ThreadPoolExecutor

    ThreadPoolExecutor线程池

    一、三个构造方法

      ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue)

       ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,RejectExceptionHandler handler)

      ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,ThreadFactory threadFactory)

      ThreadPoolExecutor(int corePoolSize,int MaxmumPoolSize,long KeepAliveTime,,TimeUnit  unit,BolokingQueue<Runnable> workQueue,ThreadFactory threadFactory,RejecExceptiontHandler handler,)

      标注

      1、CorePoolSize  线程池的基本大小

      2、MaxmunPoolSize  线程池最大数量

      3、KeepAliveTime  线程活动保持时间

      4、BlokingQueue 任务队列  (ArrayBlokingQueue   LinkedBlokingQueue  synchronousQueue  PriorityBlokingQueue)

      5、RejectExceptionHandler  饱和策略    (AbortPlicy  CallerRunsPolicy DiscardOldestPolicy  DiscardPolicy)

      6、ThreadFactory 

      

  • 相关阅读:
    android 四大组件
    apk 反编译
    通过 PC 远程控制 Android 的应用 -- 可以将手机屏幕投射显示到电脑上
    vmware 装 puppy
    vmware 装 puppy
    js prototype 添加属性对象
    js 百度云搜索框
    js 秒杀
    秒杀的性能和超卖
    [JOI2012春季合宿]Rotate (链表)
  • 原文地址:https://www.cnblogs.com/hanxue112253/p/9539621.html
Copyright © 2011-2022 走看看