I have a process that I run daily on a set of files. Each file can take up to a minute to go through the process. With 300 files, that can take up to like 12000000 minutes (or thereabouts). What I'd like to do is run several files at a time in different threads, but I don't want to bog down the machine that running the processes.

I'd like a way to keep a queue of maybe 10 threads max running, and as each thread ends, the next one in line is started in its place. Anyone ever come across anything of that nature.

I could probably come up with something myself, but I'm just too damn lazy. They say it happens in the autumn years, but I digress...