Home All Groups Group Topic Archive Search About

Controlling number of worker threads when using asynchronous socke

Author
22 Feb 2005 7:13 PM
Oldman
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

Author
22 Feb 2005 10:13 PM
Cowboy (Gregory A. Beamer) - MVP
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!
***************************

Show quoteHide quote
"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

Bookmark and Share