how many threads to run in java?

前端 未结 9 617
时光取名叫无心
时光取名叫无心 2021-02-03 16:05

I had this brilliant idea to speed up the time needed for generating 36 files: use 36 threads!! Unfortunately if I start one connection (one j2ssh connection object

9条回答
  •  逝去的感伤
    2021-02-03 16:32

    Using more threads than the number of cores on your machine is going only to slow down the whole process. It will speed up till you reach this number.

提交回复
热议问题