[Tutor] Threads

orbitz orbitz at ezabel.com
Tue Nov 16 00:39:13 CET 2004


I guess you didn't read what I said. I suggested using 
async/non-blocking sockets so you may have multiple downloads going.  
Feel free to google what they are.


Terry Carroll wrote:

>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.
>
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>  
>



More information about the Tutor mailing list