> You create threads and fork a process for every single item to process. > This has some consequences: > > - your threads will eat all the entries in the queue very quickly > - you will get a large number of processes immediately > > In this setup you do neither need threads nor a queue. Basically you > just need to iterate the input list and fork off a process for every > item you meet. However, then you do not have any control over > concurrency and your CPU will suffer. With the setup you presented you > should at least have threads wait for their processes to return so a > single thread does not fork off more than one process at a time. sure, you're right, I forget to write it here, but in my own code there is Process.wait after each fork :) -- Posted via http://www.ruby-forum.com/.