Edit: It looks like I did almost the same as Jonathan advised. I'm looking forward to std.parallelism though. I'm thinking I'd probably use some kind of parallel foreach loop that iterates over 4 files at once, and letting it do its work by spawning 4 threads. Or something like that. We'll see.