Re: threadpooling problem?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Sriram Krishnan (ksriram_at_NOSPAMgmx.net)
Date: 10/13/04


Date: Wed, 13 Oct 2004 23:06:29 +0530

The ThreadPool has a limit of 25 threads - there is your problem.

-- 
Sriram Krishnan
http://www.dotnetjunkies.com/weblog/sriram
"Mehmed Sipahi" <Mehmed Sipahi@discussions.microsoft.com> wrote in message 
news:C4463DC9-1905-40BB-AD22-4150EB7F35A7@microsoft.com...
> I am programming a asyncronous server with .NET using ThreadPool..
> Basicly Client connected to server using TCP sockets
> When I test the program until 25 client server can respond all clients.but
> after 25. client connected server cant respond other clients!where is the
> problem?
>
> when a client connected i want to check socket if data avaible..
>
> ThreadPool.QueueUserWorkItem(new WaitCallback(CheckSocket),_socket);
> ....
> the CheckSocket callback:
> private void CheckSocket(object state)
> {
> while(_connected)
> {
> if(_socket.Poll(-1, SelectMode.SelectRead))
>  {
> if(_socket.Connected)
> {
>                           ....
>                                }
> }
> }
> 


Relevant Pages

  • threadpooling problem?
    ... I am programming a asyncronous server with .NET using ThreadPool.. ... Basicly Client connected to server using TCP sockets ...
    (microsoft.public.dotnet.framework)
  • Re: threadpooling problem?
    ... that is not a good way to do an async server. ... "Mehmed Sipahi" wrote in message ... > I am programming a asyncronous server with .NET using ThreadPool.. ... > Basicly Client connected to server using TCP sockets ...
    (microsoft.public.dotnet.framework)
  • Re: Asynchronous I/O or multiple threads?
    ... It's job is to be a very specialized database server that listens ... > this and for a number of reasons it's impractical for us to use it. ... Given that MSDE is the most obvious choice IMO, ... you start doing other things which require the threadpool within ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Asynchronous I/O or multiple threads?
    ... I may have missed the point here, but why do you need a database at all for ... >> program to scale well but I don't want to overwhelm the server. ... > Given that MSDE is the most obvious choice IMO, ... > you start doing other things which require the threadpool within ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Error executing version of Net Framework
    ... for that detail explanation. ... How long the people will be connected to the server on average. ... serveral things, they are response time, throughput and stability. ... threadpool and the max allowed nubmer of threads. ...
    (microsoft.public.dotnet.framework.aspnet)