[Tutor] simple threads program
calvin
exnihilo@myrealbox.com
Fri Jul 18 16:19:18 2003
Thomas CLive Richards wrote:
>>I would like to download and save a bunch of pages, and since the
>>download is most of the time, it seems like a good candidate for
>>speedup using threads.
>>
>>
>>
>
>I'm not going to comment on the code (because i can't), but your example
>seems a little wierd...
>
>surely if the downloading take up most of the time, this would mean that
>you're on a fairly slow connection? perhaps dialup? If so, how would
>having multiple threads speed it up? OK, so there would be a slight
>speed increase, but you can't download 3 times as much by having 3
>separate downloads; they'll just be coming down at 1/3 the speed....
>
No. I mean that downloading takes most of the time, because the cpu work
is very little. I have broadband, and I rarely use close to my download
capacity for any 1 single download, so downloading simultaneously is
indeed faster than downloading sequentially.
>
>When i used threads, i just followed the documentation in the threading
>module, and it worked just fine ;)
>
>
>
thanks, that's helpful ;-)
-calvin