Click here to Skip to main content
15,891,856 members
Home / Discussions / C#
   

C#

 
Generalremoting event problem Pin
manusha1-Oct-03 5:37
manusha1-Oct-03 5:37 
Generalimporting VB 6.0 into C# project... Pin
Anonymous1-Oct-03 4:47
Anonymous1-Oct-03 4:47 
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 
Don't use an array of threads. Use async IO or ThreadPool.QueueUserWorkItem() instead.

Use the C# lock statement or possibly Interlocked.Decrement() to protect your shared state.

Think about the fact that what your just described will not correction resume because you describe decrementing a counter when the download is started. You need to maintain state about which ones are started and which ones are completed. You can't rely on them completing in the order the downloads were started.

Why do you think you need to download five pages simultaneously anyway? That sounds suspect to start with.


--
-Blake (com/bcdev/blake)
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 
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 

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.