Reading and writing different files in their own threads from my main loop in C++11
问题 I am trying to understand, then, write some code that has to read from, and write to many different files and do so from the main loop of my application. I am hoping to use the C++11 model present in VS 2013. I don't want to stall the main loop so I am investigating spinning off a thread each time a request to write or read a file is generated. I've tried many things including using the async keyword which sounds promising. I boiled down some code to a simple example: #include <future>