Spring Batch - How to read one big file in multiple threads?

不羁岁月 提交于 2019-12-05 09:57:17
artbristol

Multithreading is only useful if your threads are doing different things at the same time. For example, you can have two threads running on separate CPUs. Or one thread can be waiting for a network message while the other is painting the screen.

But in your case, both threads would be waiting for the same IO from the same device, so there's no point using more than one.

See also this question Reading a file by multiple threads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!