Click here to Skip to main content
15,906,329 members
Home / Discussions / C#
   

C#

 
GeneralGDI+ font and scalable graphics Pin
Member 5506441-Oct-03 2:33
Member 5506441-Oct-03 2:33 
GeneralRe: GDI+ font and scalable graphics Pin
Mazdak1-Oct-03 3:46
Mazdak1-Oct-03 3:46 
GeneralRe: GDI+ font and scalable graphics Pin
Member 5506441-Oct-03 4:03
Member 5506441-Oct-03 4:03 
GeneralRe: GDI+ font and scalable graphics Pin
azusakt1-Oct-03 15:21
azusakt1-Oct-03 15:21 
Generalthreading issue... Pin
profoundwhispers1-Oct-03 0:53
profoundwhispers1-Oct-03 0:53 
GeneralRe: threading issue... Pin
Blake Coverett1-Oct-03 1:50
Blake Coverett1-Oct-03 1:50 
GeneralRe: threading issue... Pin
profoundwhispers1-Oct-03 1:56
profoundwhispers1-Oct-03 1:56 
GeneralRe: threading issue... Pin
Blake Coverett1-Oct-03 8:22
Blake Coverett1-Oct-03 8:22 
profoundwhispers wrote:
Actually, what I was planning to do is, if I detected that the download was interrupted, I would increment this counter by 5, and re-start. This way, all pages that were downloading at that time, will be resumed.

You can't get away with just a single counter like that. That's the class problem I was describing when I said you couldn't count on them completing in order. Consider this sort of pattern:

counter = 10

start 1, counter = 9
start 2, counter = 8
start 3, counter = 7
start 4, counter = 6
start 5, counter = 5
end 2
start 6, counter = 4

If it aborts here, incrementing the counter by 5 puts it back at 9, meaning page 2 will be downloaded twice and page 1 lost.

You need to track completions separately.

profoundwhispers wrote:
I'm writing a program for someone to parse his daily online reports. It's much faster if I download the html pages simultaneously than to get them one by one. Also, I can parse one page while the other is downloading.

Right, but why particularly 5 at a time? What you probably want to do is just fire off all your WebRequest.BeginGetResponse and let the normal infrastructure dispatch them a few at a time. It already knows how to balance such things.

--
-Blake (com/bcdev/blake)
GeneralEncryption/Decryption problem Pin
3ddA30-Sep-03 23:50
3ddA30-Sep-03 23:50 
GeneralRe: Encryption/Decryption problem Pin
Julian Bucknall [MSFT]1-Oct-03 5:35
Julian Bucknall [MSFT]1-Oct-03 5:35 
GeneralRe: Encryption/Decryption problem Pin
3ddA1-Oct-03 6:31
3ddA1-Oct-03 6:31 
GeneralRe: Encryption/Decryption problem, prettier code now Pin
3ddA1-Oct-03 7:28
3ddA1-Oct-03 7:28 
GeneralTCP Remote Endpoints Pin
Tatham30-Sep-03 19:50
Tatham30-Sep-03 19:50 
GeneralRe: TCP Remote Endpoints Pin
Blake Coverett1-Oct-03 1:36
Blake Coverett1-Oct-03 1:36 
GeneralRe: TCP Remote Endpoints Pin
Tatham1-Oct-03 4:03
Tatham1-Oct-03 4:03 
GeneralRe: TCP Remote Endpoints Pin
Blake Coverett1-Oct-03 8:25
Blake Coverett1-Oct-03 8:25 
GeneralRe: TCP Remote Endpoints Pin
Tatham2-Oct-03 3:09
Tatham2-Oct-03 3:09 
GeneralRe: TCP Remote Endpoints Pin
Blake Coverett2-Oct-03 8:50
Blake Coverett2-Oct-03 8:50 
GeneralGeting/seting properties on files. Pin
Mattias Olgerfelt30-Sep-03 14:41
Mattias Olgerfelt30-Sep-03 14:41 
GeneralRe: Geting/seting properties on files. Pin
J. Dunlap30-Sep-03 15:05
J. Dunlap30-Sep-03 15:05 
GeneralRe: Geting/seting properties on files. Pin
Mattias Olgerfelt2-Oct-03 14:46
Mattias Olgerfelt2-Oct-03 14:46 
GeneralTransparent Background for PocketPC Pin
Rowdy12330-Sep-03 14:07
Rowdy12330-Sep-03 14:07 
GeneralRe: Transparent Background for PocketPC Pin
J. Dunlap30-Sep-03 14:12
J. Dunlap30-Sep-03 14:12 
GeneralRe: Transparent Background for PocketPC Pin
Rowdy12330-Sep-03 14:22
Rowdy12330-Sep-03 14:22 
GeneralRe: Transparent Background for PocketPC Pin
J. Dunlap30-Sep-03 14:28
J. Dunlap30-Sep-03 14:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.