On 3/23/06, Greg Duffy <[EMAIL PROTECTED]> wrote:
>
> Could someone outline the process for setting up an IoConnector
> (DatagramConnector specifically) to use a Thread Pool?
>
> It seems like no matter what I do, my protocol encoder always executes
> in the IoConnector's thread. I've tried adding a ThreadPoolFilter
> manually in the IoConnectorConfig and in the IoHandler when an
> IoSession is created. I've also tried removing my ThreadPoolFilter and
> using the new default ThreadModel, PooledThreadModel.
>
> Could someone write a short example of how to accomplish this? I
> looked into the code a bit, and noticed that the ThreadPoolFilter
> doesn't spawn a thread for filterWrite ... is that the problem, or is
> that the way it was intended to be?


session.write() doesn't run in a thread pool.  It is executed in the current
thread you called write().

Did you check if event handler methods run in a thread pool?

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to