How to read files in multithreaded mode?

后端 未结 4 1587
深忆病人
深忆病人 2021-01-06 00:40

I currently have a program that reads file (very huge) in single threaded mode and creates search index but it takes too long to index in single threaded environment.

<
4条回答
  •  离开以前
    2021-01-06 01:02

    See this thread - if your files are all on the same disk then you can't do better than reading them with a single thread, although it may be possible to process the files with multiple threads once you've read them into main memory.

提交回复
热议问题