Solved Check how many threads a cpu can handle for a fixed thread pool.

Discussion in 'Spigot Plugin Development' started by Mr.Midnight, Jun 25, 2016.

  1. Ello, I am new into Thread pools and was wondering how I can tell how many threads my Cpu can handle whilst initializing the thread pool?

    newFixedThreadPool(int maxThreadsForCpu)
     
  2. What are you planning on doing with this?
     
  3. Runtime.getRuntime().availableProcessors() may help
     
    • Winner Winner x 1
    • Like Like x 1