import java.util.concurrent.Arra...
发布于 2022-03-03 11:40:06
import java.util.concurrent.ArrayBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit
public class Main {
public static void main(String[] args) {
ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 10, 15, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(5), new ThreadPoolExecutor.CallerRunsPolicy())
}
}
线程池executor在空闲状态下的线程个数是?
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit
public class Main {
public static void main(String[] args) {
ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 10, 15, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(5), new ThreadPoolExecutor.CallerRunsPolicy())
}
}
线程池executor在空闲状态下的线程个数是?
登录后免费查看答案
关注者
0
被浏览
13