mardi 1 novembre 2016

Best strategy for parsing a lot of CSV files in C++ 11

What is the best strategy for parallel parsing a lot of CVS-files and writing some "summary" information to another file (which can be considered as a report file) using modern C++ 11 features? I am thinking about creating two queues and thread pool: first queue contains names of csv-files. The second queue contains handled information (after processing csv). Multiple threads (max number of these kind of threads is (thread::hardware_concurrency() - 1)) parse CVS files and one thread takes new item from the second queue and write it to report file. Is this strategy is optimal and right? Can you recommend me some examples of solving the similar problems using C++11 ?

Aucun commentaire:

Enregistrer un commentaire