I have to process, roughly 170.000 files, and would like to use multiple threads.
The name of the files is sequential following the Year-Number format and are sorted by year in folders. (but they can be all in the same folder).
Different years have different file counts. Files are small size, only a few (10<size<20) KB each.
The order in witch they are processed is indifferent, since the output of the processing task is going to stored in a SQL Database.
What would be the best way to this? Without opening the same file twice?
Here is a little example:
Then the FileProcessor class: