2 ms·
>If your workload consists of many small concurrent tasks, spawning threads can easily become costlier than processing the workload itself. Executors have been
by xxs 4y ago
>If your workload consists of many small concurrent tasks, spawning threads can easily become costlier than processing the workload itself.
Executors have been in java since 1.5, and even before people used queues and thread pools. Starting threads on demand has never been an accepted way to write code aside, perhaps, some blog posts.