You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2006/03/07 16:21:37 UTC

Thread model configuration

Hi all,

I've been thinking of adding a thread model interface so users can configure
a thread model easily by calling a setter of IoServiceConfig.  For example:

acceptor.getConfig().setThreadModel( ThreadModel.SINGLE );

acceptor.getConfig().setThreadModel( new PooledThreadModel( ... ) );

I think this is much more intuitive than adding a thread pool filter and
managing life cycle of it.  Of course, it will be implemented as a filter
internally.

Besides this, a reconnection policy of a IoConnector could be configured in
the same manner.

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

Re: Thread model configuration

Posted by peter royal <pr...@apache.org>.
On Mar 7, 2006, at 10:21 AM, Trustin Lee wrote:
> I've been thinking of adding a thread model interface so users can  
> configure
> a thread model easily by calling a setter of IoServiceConfig.  For  
> example:
>
> acceptor.getConfig().setThreadModel( ThreadModel.SINGLE );
>
> acceptor.getConfig().setThreadModel( new PooledThreadModel( ... ) );
>
> I think this is much more intuitive than adding a thread pool  
> filter and
> managing life cycle of it.  Of course, it will be implemented as a  
> filter
> internally.

sounds good!
-pete

-- 
proyal@apache.org - http://fotap.org/~osi