Relative Content

Tag Archive for c#io

Is writing mutiple different files in parallel faster or worse?

for (int i = 0; i < 100; i++) threadPool.post([=]() { auto result = // do some complex tasks; ofstream os(“test-” + i); os << result; }); Lets say thread pool has a thread num of 10, and I want to write 100 files. Is writing in parallel better than storing the result and write […]