PC Review


Reply
Thread Tools Rate Thread

Controlling number of worker threads when using asynchronous socke

 
 
=?Utf-8?B?T2xkbWFu?=
Guest
Posts: n/a
 
      22nd Feb 2005
If I am writing the server side of a client-server application using C/C++
the most scalable solution to handle requests is to use the I/O completion
port model.
In C# I discovered that asynchronous sockets use the I/O completion port
model underneath. However, I do I control how many "worker" threads are used
to service the request. I do not want the server side application spinning a
thread for every request.

Thanks,

Oldman
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
Guest
Posts: n/a
 
      22nd Feb 2005
You can use a threadpool and new threads will only be created when there are
no available threads. That would be my first shot.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Oldman" wrote:

> If I am writing the server side of a client-server application using C/C++
> the most scalable solution to handle requests is to use the I/O completion
> port model.
> In C# I discovered that asynchronous sockets use the I/O completion port
> model underneath. However, I do I control how many "worker" threads are used
> to service the request. I do not want the server side application spinning a
> thread for every request.
>
> Thanks,
>
> Oldman

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get function return from asynchronous background worker TheVillageCodingIdiot Microsoft Dot NET Framework 1 2nd Jul 2008 10:52 PM
Two worker threads using one queue Ralph Wiggum Microsoft C# .NET 3 14th Feb 2008 02:43 PM
What to do while waiting worker threads to finish their job... Ing. Davide Piras Microsoft C# .NET 3 22nd Dec 2006 07:39 PM
Asynchronous Delegates always using same worker thread Coot Microsoft C# .NET 4 1st May 2004 07:06 PM
Worker Threads and Events Jacob Microsoft C# .NET 4 15th Apr 2004 09:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 AM.