in reply to Re^2: Parallel downloading under Win32?
in thread Parallel downloading under Win32?
It's not actually hard. The system has threads that are fed off a Thread::Queue. Each thread takes a job from the queue, performs it, then takes the next one from the queue. The map just creates $T threads, and to tell each thread that it is finished, it sticks $T undef elements at the end of the queue. Then the main thread waits that all threads finish their work. That's all there is to it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Parallel downloading under Win32?
by Xenofur (Monk) on Apr 29, 2009 at 21:25 UTC |