Click here to Skip to main content
15,912,082 members
Home / Discussions / C#
   

C#

 
GeneralCOM to C# interfacing using SafeArrays Pin
tyyryrteytry26-Feb-04 23:14
tyyryrteytry26-Feb-04 23:14 
GeneralRe: COM to C# interfacing using SafeArrays Pin
Heath Stewart27-Feb-04 5:28
protectorHeath Stewart27-Feb-04 5:28 
GeneralHttpWebResponse Strange Behavior... Pin
DuKeClod26-Feb-04 20:04
DuKeClod26-Feb-04 20:04 
GeneralRe: HttpWebResponse Strange Behavior... Pin
Heath Stewart27-Feb-04 3:46
protectorHeath Stewart27-Feb-04 3:46 
GeneralRe: HttpWebResponse Strange Behavior... Pin
DuKeClod27-Feb-04 4:18
DuKeClod27-Feb-04 4:18 
GeneralRe: HttpWebResponse Strange Behavior... Pin
Heath Stewart27-Feb-04 5:16
protectorHeath Stewart27-Feb-04 5:16 
GeneralRe: HttpWebResponse Strange Behavior... Pin
DuKeClod27-Feb-04 8:17
DuKeClod27-Feb-04 8:17 
GeneralRe: HttpWebResponse Strange Behavior... Pin
Heath Stewart27-Feb-04 8:23
protectorHeath Stewart27-Feb-04 8:23 
You can't expect 500 threads to all run concurrently - the processor doesn't even allow this. You are familiar with time slices and the CPU, aren't you? Processes only get so much time. With that many threads, there's no way the CPU could service them all in a reasonable amount of time. That's why many web servers are multi-processor systems. You need to maintain better control of your threads.

If you look at the System.Threading namespace, you'll see several classes that can specify a timeout or wait indefinitely, but you should still avoid creating 500 threads. Consider designing your application so that you wait for threads to finish and then start another one. See the Threading[^] section in the .NET Framework SDK for information and examples.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: HttpWebResponse Strange Behavior... Pin
DuKeClod27-Feb-04 9:30
DuKeClod27-Feb-04 9:30 
GeneralXML comments don't show up when referencing DLL Pin
krisp26-Feb-04 18:53
krisp26-Feb-04 18:53 
GeneralRe: XML comments don't show up when referencing DLL Pin
Heath Stewart27-Feb-04 3:43
protectorHeath Stewart27-Feb-04 3:43 
GeneralArray iteration using unsafe code Pin
Meysam Mahfouzi26-Feb-04 18:23
Meysam Mahfouzi26-Feb-04 18:23 
GeneralRe: Array iteration using unsafe code Pin
Member 26118827-Feb-04 2:55
Member 26118827-Feb-04 2:55 
GeneralRe: Array iteration using unsafe code Pin
Heath Stewart27-Feb-04 3:34
protectorHeath Stewart27-Feb-04 3:34 
GeneralRe: Array iteration using unsafe code Pin
scadaguy27-Feb-04 3:07
scadaguy27-Feb-04 3:07 
GeneralRe: Array iteration using unsafe code Pin
turbochimp27-Feb-04 4:01
turbochimp27-Feb-04 4:01 
GeneralArray of Interfaces Pin
Meysam Mahfouzi26-Feb-04 18:07
Meysam Mahfouzi26-Feb-04 18:07 
GeneralRe: Array of Interfaces Pin
Corinna John26-Feb-04 21:06
Corinna John26-Feb-04 21:06 
GeneralRe: Array of Interfaces Pin
Member 26118827-Feb-04 2:42
Member 26118827-Feb-04 2:42 
GeneralRe: Array of Interfaces Pin
Heath Stewart27-Feb-04 3:29
protectorHeath Stewart27-Feb-04 3:29 
GeneralRe: Array of Interfaces Pin
Werdna27-Feb-04 5:26
Werdna27-Feb-04 5:26 
Generaldatagrid to windows form Pin
ASGill26-Feb-04 17:27
ASGill26-Feb-04 17:27 
GeneralRe: datagrid to windows form Pin
Mazdak26-Feb-04 21:15
Mazdak26-Feb-04 21:15 
GeneralRe: datagrid to windows form Pin
ASGill28-Feb-04 15:38
ASGill28-Feb-04 15:38 
GeneralRe: datagrid to windows form Pin
Mazdak28-Feb-04 21:42
Mazdak28-Feb-04 21:42 

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.