Android之ThreadPoolExecutor
来源:互联网 发布:dm500账号上传软件 编辑:程序博客网 时间:2024/05/19 16:48
Creates a new
ThreadPoolExecutor
with the given initial parameters and default thread factory and rejected execution handler.Creates a new
ThreadPoolExecutor
with the given initial parameters and default rejected execution handler.Creates a new
ThreadPoolExecutor
with the given initial parameters and default thread factory.Creates a new
ThreadPoolExecutor
with the given initial parameters. Sets the policy governing whether core threads may time out and terminate if no tasks arrive within the keep-alive time, being replaced if needed when new tasks arrive.
Returns true if this pool allows core threads to time out and terminate if no tasks arrive within the keepAlive time, being replaced if needed when new tasks arrive.
Executes the given task sometime in the future.
Returns the approximate number of threads that are actively executing tasks.
Returns the approximate total number of tasks that have completed execution.
Returns the core number of threads.
Returns the thread keep-alive time, which is the amount of time that threads in excess of the core pool size may remain idle before being terminated.
Returns the largest number of threads that have ever simultaneously been in the pool.
Returns the maximum allowed number of threads.
Returns the current number of threads in the pool.
Returns the task queue used by this executor.
Returns the current handler for unexecutable tasks.
Returns the approximate total number of tasks that have ever been scheduled for execution.
Returns the thread factory used to create new threads.
Returns true if this executor is in the process of terminating after
shutdown()
orshutdownNow()
but has not completely terminated.Starts all core threads, causing them to idly wait for work.启动所有的内核线程,使他们为工作干等着。
Starts a core thread, causing it to idly wait for work.启动一个内核线程,使他们
Tries to remove from the work queue all
Future
tasks that have been cancelled.试图从工作队列中删除已被取消的所有未来任务。Removes this task from the executor's internal queue if it is present, thus causing it not to be run if it has not already started.
Sets the core number of threads.
Sets the time limit for which threads may remain idle before being terminated.
Sets the maximum allowed number of threads.
Sets a new handler for unexecutable tasks.
Sets the thread factory used to create new threads.
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
Returns a string identifying this pool, as well as its state, including indications of run state and estimated worker and task counts.
Protected Methods:
Method invoked upon completion of execution of the given Runnable.在给定运行调用执行完成的方法。
Method invoked prior to executing the given Runnable in the given thread.
Invokes
shutdown
when this executor is no longer referenced and it has no threads.当这个执行程序不再被引用时,它会调用它,它没有线程。Method invoked when the Executor has terminated.
用法:http://blog.sina.com.cn/s/blog_80723de801011xct.html 0 0
- Android之ThreadPoolExecutor
- Android之ThreadPoolExecutor源码分析
- Android线程学习(一)之ThreadPoolExecutor
- Android-ThreadPoolExecutor
- android线程池详解之ThreadPoolExecutor剖析(二)
- Android之线程池ThreadPoolExecutor简介(面试)
- Android线程管理之ThreadPoolExecutor自定义线程池
- Android线程管理之ThreadPoolExecutor自定义线程池
- Java多线程之ThreadPoolExecutor
- 浅入浅出之 ThreadPoolExecutor详解
- 多线程之ThreadPoolExecutor
- Java多线程之ThreadPoolExecutor
- java多线程之ThreadPoolExecutor
- Java 之ThreadPoolExecutor.RejectedExecutionHandler
- java多线程之ThreadPoolExecutor
- ThreadPoolExecutor 源码剖析之
- Android API : ThreadPoolExecutor
- Android 多线程 ThreadPoolExecutor
- LightOJ 1036 - A Refining Company(DP)
- 最小圆覆盖——模板题
- python文件头--文件编码指定
- Oracle logminer使用方法总结
- Metronic V4.5.2 Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.5
- Android之ThreadPoolExecutor
- 基于RecyclerView-添加上啦加载(AndroidStudio)
- VS中为代码添加虚线
- 动态规划-LIS
- 关于select标签的value
- 消除字号标签<h1><h2><h3>的自动换行
- ASP.net(NVelocity)中浏览器端与服务器端频繁交互传值的问题
- 关于C#中对象用作属性
- EF实体框架模型使用Linq获取数据库数据