ThreadPoolExecutor

public void init() {
  executorService = new ThreadPoolExecutor(corePoolSize, corePoolSize+1, 1,  TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(queueSize));
}

executorService.submit(new LotteryTaskMsgCallable(taskMsg,persist));

你可能感兴趣的:(ThreadPoolExecutor)