Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
AnswerRe: Limiting maximum connections Pin
harold aptroot2-Mar-09 1:09
harold aptroot2-Mar-09 1:09 
AnswerRe: Limiting maximum connections Pin
Luc Pattyn2-Mar-09 3:16
sitebuilderLuc Pattyn2-Mar-09 3:16 
GeneralRe: Limiting maximum connections Pin
harold aptroot2-Mar-09 4:40
harold aptroot2-Mar-09 4:40 
GeneralRe: Limiting maximum connections Pin
invader822-Mar-09 4:35
invader822-Mar-09 4:35 
AnswerRe: Limiting maximum connections Pin
N a v a n e e t h2-Mar-09 1:16
N a v a n e e t h2-Mar-09 1:16 
GeneralRe: Limiting maximum connections Pin
invader822-Mar-09 4:46
invader822-Mar-09 4:46 
GeneralRe: Limiting maximum connections Pin
N a v a n e e t h2-Mar-09 15:32
N a v a n e e t h2-Mar-09 15:32 
AnswerRe: Limiting maximum connections Pin
Luc Pattyn2-Mar-09 3:20
sitebuilderLuc Pattyn2-Mar-09 3:20 
Hi,


invader82 wrote:
Has anyone a better idea how to keep the cpu down?


Use an event-driven scheme if one is available: getting a signal something must be done, is more efficient than having a loop polling whether somethind should be done all the time. (BTW: Thread.Sleep(1) will take 10 or more msec on average, see my timers article).

If you can't use an event-driven scheme (because no event is available, or you don't trust it sufficiently), implement a polling loop, however give it a delay that fits with your needs, e.g. if the client is a human typing/clicking in a browser, 50 msec would be good enough.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Sunday, June 12, 2011 8:59 AM

GeneralRe: Limiting maximum connections Pin
invader822-Mar-09 4:59
invader822-Mar-09 4:59 
AnswerRe: Limiting maximum connections Pin
Luc Pattyn2-Mar-09 5:03
sitebuilderLuc Pattyn2-Mar-09 5:03 
Questionland phone call from pc Pin
rizvi_codeproject2-Mar-09 0:29
rizvi_codeproject2-Mar-09 0:29 
GeneralRe: land phone call from pc Pin
Kristian Sixhøj2-Mar-09 4:52
Kristian Sixhøj2-Mar-09 4:52 
Questionprocess details Pin
shefa' isied2-Mar-09 0:22
shefa' isied2-Mar-09 0:22 
AnswerRe: process details Pin
Luc Pattyn2-Mar-09 3:25
sitebuilderLuc Pattyn2-Mar-09 3:25 
QuestionDrag and drop to mouse point location Pin
Low Pei Yang2-Mar-09 0:03
Low Pei Yang2-Mar-09 0:03 
AnswerRe: Drag and drop to mouse point location Pin
Henry Minute2-Mar-09 10:51
Henry Minute2-Mar-09 10:51 
GeneralRe: Drag and drop to mouse point location Pin
Low Pei Yang2-Mar-09 16:13
Low Pei Yang2-Mar-09 16:13 
QuestionIComparer problem Pin
livez1-Mar-09 23:22
livez1-Mar-09 23:22 
AnswerRe: IComparer problem Pin
CPallini1-Mar-09 23:42
mveCPallini1-Mar-09 23:42 
AnswerRe: IComparer problem Pin
DaveyM691-Mar-09 23:47
professionalDaveyM691-Mar-09 23:47 
AnswerRe: IComparer problem PinPopular
J4amieC2-Mar-09 0:13
J4amieC2-Mar-09 0:13 
GeneralRe: IComparer problem Pin
livez2-Mar-09 0:37
livez2-Mar-09 0:37 
AnswerRe: IComparer problem Pin
Luc Pattyn2-Mar-09 3:28
sitebuilderLuc Pattyn2-Mar-09 3:28 
QuestionC# Code Pin
Zeyad Jalil1-Mar-09 23:03
professionalZeyad Jalil1-Mar-09 23:03 
Answerrepost - Ignore Pin
J4amieC1-Mar-09 23:21
J4amieC1-Mar-09 23:21 

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.