Asynchronous socket operations and threadpool
- From: "Yifan Li" <nomail@xxxxxxxxxxxx>
- Date: Wed, 1 Mar 2006 16:26:59 -0700
Dear All,
I have a general question regarding the best practice for using asynchronous
socket operations and threadpool.
It often happens that I need to perform lenghty operations after
asynchronous receive/send/accept. These operations themselves are often
composed of multiple atom operations which can be completed asynchronously.
For example, upon accepting a connection I might want to lookup the remote
host using dns, and then send/receive some data. These things must be
completed in order (e.g. have to wait for dns to finish before sending).
My question is this:
I understand that the callbacks are queued and executed on a threadpool
thread, which is limited in quantity. I believe that this will become a
bottle neck of my application if the subsequent actions are done in a
synchronous fasion. Should I simply increase the number of thread pool
threads (which is easy) or should I make everything asynchronous? What will
be the complications if I simply increase the number of threadpool threads?
Many thanks in advance!
Li
.
- Follow-Ups:
- Re: Asynchronous socket operations and threadpool
- From: Chris Mullins
- Re: Asynchronous socket operations and threadpool
- Prev by Date: Re: Generics SortedList Question
- Next by Date: Re: Asynchronous socket operations and threadpool
- Previous by thread: Re: Generics SortedList Question
- Next by thread: Re: Asynchronous socket operations and threadpool
- Index(es):
Loading