[英]Get all AsyncTasks that are executed and currently running in Android app
[英]How to get the total number of AsyncTasks currently running in parallel in the thread pool?
在计划新的AsyncTask之前,我需要检查当前并行执行的AsyncTask的数量,以便仅在并发任务的数量小于最大池大小时才计划新任务。
获取池中所有当前任务计数的最佳方法是什么?
返回正在主动执行任务的线程的大概数量。
threadPool.getActiveCount()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.