Warning! Crystal ball failure. Unfortunately, I wasn't able to magically read your mind and see what you tried, how and why it failed. See How (Not) To Ask A Question to get some help. The important part you missed is that you must post an example of your code.
hi, thanks for consulting the crystalball.
I cant post the code ... but here is a better explanation.
I have a file that contain list of dirs to ftp.
I have this script to start one thread per dir.
But this affects the bandwidth, so wanted only two threads at a time.
Now that i already have a script that generates thread for each dir, I want to know how to modify script to limit only two threads at a time.
That is my script shud generate a two threads for ftp'ing 2 dirs at a time, and when that finishes generate two more for next 2 dirs... & so on
I have currently solved the problem by using a subroutine that creates just two threads at a time (& i pass two dirs to this sub).