Relative Content

Tag Archive for cmultithreadingchunksfile-read

Divide lines of a file per chunks for multithreading in C

I am trying to read a file with various threads in C, but as I divide in chunks based of bytes some may start/end in the middle of lines. I was trying to adjust the chunk size in case that happened.
I don’t know if this is a good approach, as I understand that multithread reading a file may only be beneficial in the SSD era. I don’t know if trying to read simultaneous a file may induce some type of memory error… Maybe should I only multithread the processing of each line and other tasks?