Re: Processor usage in VB program
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Tue, 4 Apr 2006 18:00:06 +0100
John S <js162@xxxxxxxxxxxxxxxx> wrote:
As I said before, I'm fairly new to this and have to admit I don't fully
understand what you said.
I think I could work out how to run the the Listener on another thread but
don't know what blocking calls are. Is that where you tell the thread to
sleep for a short while?
No - it's where you make a call (Read, Accept etc) that doesn't return
until it's read some data, accepted a connection etc.
I don't see how accepting the calls asynchronously would help a great deal
as it's not the calls that appear to be the problem. It seems more like the
fact that because I have no idea when the next call may be sent, The listener
has to sit waiting all the time.
Yes, the listener has to sit waiting for events - but if you use a
block call, it can do so without looping round, and if you do it in a
different thread, it won't make the UI freeze.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Prev by Date: Re: RichTextFormat to PlainText
- Next by Date: Re: VS.NET 2005 Beta2 and .NET Framework 2.0 release !
- Previous by thread: Setup and Deployment options
- Next by thread: Re: Processor usage in VB program
- Index(es):
Relevant Pages
|