search

Home  >  Q&A  >  body text

java 线程池序号一直增加问题

高洛峰高洛峰2802 days ago938

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 10:48:15

    Generally, thread pools are used as singletons.

    private static final ExecutorService executors = Executors.newCachedThreadPool();

    There are already two thread pool instances in your code. So it showed up pool-2.

    reply
    0
  • 阿神

    阿神2017-04-18 10:48:15

    Dear, this happened to me too, how did you solve it?

    reply
    0
  • Cancelreply