Here is a small program (https://gist.github.com/yshui/a426f73be77d1d699555) that uses taskPool to parallely reading from /proc/<pid>/ and sum the swap usage.

Individual tasks has zero dependency between each other, but when I remove the 'defaultPoolThreads(1)' line, the programs takes 8x more CPU time and also runs longer in total (I have 12 cores).

What is wrong here?

Reply via email to