title: C++ - How to chunk a file for simultaneous/async processing?
body: <p>How does one read and split/chunk a file by the number of lines?</p>
  
  <p>I would like to partition a file into separate buffers, while ensuring that a line is not split up between two or more buffers. I plan on passing these buffers into their own pthreads so they can perform some type of simultaneous/asynchronous processing.</p>
  
  <p>I've read the answer below <a href="https://stackoverflow.com/questions/10527187/reading-and-writing-in-chunks-on-linux-using-c">reading and writing in chunks on linux using c</a> but I don't think it exactly answers the question about making sure that a line is not split up into two or more buffers.</p>