Click here to Skip to main content
15,923,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: capture command line output Pin
IsaacB3-Oct-03 4:06
IsaacB3-Oct-03 4:06 
GeneralCOM interop and data types Pin
lpvoid1-Oct-03 10:07
lpvoid1-Oct-03 10:07 
GeneralRe: COM interop and data types Pin
Corinna John1-Oct-03 23:48
Corinna John1-Oct-03 23:48 
GeneralSelf Upgrading Executables (C# Windows App) Pin
OBRon1-Oct-03 9:45
OBRon1-Oct-03 9:45 
GeneralRe: Self Upgrading Executables (C# Windows App) Pin
SimonS2-Oct-03 1:24
SimonS2-Oct-03 1:24 
GeneralRe: Self Upgrading Executables (C# Windows App) Pin
OBRon2-Oct-03 2:54
OBRon2-Oct-03 2:54 
QuestionCOM Ports in C# - How ? Pin
raheela1-Oct-03 9:42
raheela1-Oct-03 9:42 
GeneralArray question Pin
Joe Woodbury1-Oct-03 7:56
professionalJoe Woodbury1-Oct-03 7:56 
GeneralRe: Array question Pin
jparsons1-Oct-03 9:20
jparsons1-Oct-03 9:20 
GeneralRe: Array question Pin
Joe Woodbury1-Oct-03 10:59
professionalJoe Woodbury1-Oct-03 10:59 
GeneralRe: Array question Pin
Frank Olorin Rizzi2-Oct-03 4:12
Frank Olorin Rizzi2-Oct-03 4:12 
GeneralRe: Array question Pin
jparsons2-Oct-03 5:29
jparsons2-Oct-03 5:29 
GeneralRe: Array question Pin
Julian Bucknall [MSFT]2-Oct-03 6:13
Julian Bucknall [MSFT]2-Oct-03 6:13 
GeneralRe: Array question Pin
Joe Woodbury2-Oct-03 6:40
professionalJoe Woodbury2-Oct-03 6:40 
GeneralInspiration needed - end user form editing Pin
Member 961-Oct-03 6:59
Member 961-Oct-03 6:59 
GeneralRe: Inspiration needed - end user form editing Pin
Michael P Butler2-Oct-03 1:42
Michael P Butler2-Oct-03 1:42 
GeneralRe: Inspiration needed - end user form editing Pin
Member 962-Oct-03 5:05
Member 962-Oct-03 5:05 
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)

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.