There is a collection of files in the file system on the server. When an incoming request is necessary to read all these files and carry out actions with the data. Is it possible to do this asynchronously? Ie at the output you need a collection of results for each file.

    1 answer 1

    • The correct way is to apply the Producer-Consumer scheme with a single reading thread and a pool of working threads that will perform operations on files.

    • That is, roughly speaking, the reading thread adds some task, which is picked up by worker thread'ами , and WaitForAll, is done for all tasks until the final result is obtained.

    • Thanks, we will try - AlekseyB