[Tutor] Threads

Terry Carroll carroll at tjc.com
Tue Nov 16 00:23:49 CET 2004

On Mon, 15 Nov 2004, orbitz wrote:

> Why waste your time using threads for this? Network I/O is so dang slow 
> using threads will not make the downloading any faster.  Using 
> async/non-blocking sockets should be fine and easier to program, less 
> worry of deadlock's and easier to debug IMO.

Boy, I see the network I/O slowness as a reason to use threads.

If one file takes, say, 1 minute to download, then doing 12 downloads 
serially will take 12 minutes.  But if I can have four threads running, I 
can have each thread do 3 downloads, total time 3 minutes.

I'm assuming that the reason for the slowness is not saturation of the 
network, but rather is a throttle on the web server.

More information about the Tutor mailing list