Reduce unnecessary thread creation and destruction caused by IdleStatusChecker
------------------------------------------------------------------------------

                 Key: DIRMINA-547
                 URL: https://issues.apache.org/jira/browse/DIRMINA-547
             Project: MINA
          Issue Type: Improvement
          Components: Core
    Affects Versions: 2.0.0-M1
            Reporter: Trustin Lee
            Assignee: Trustin Lee
            Priority: Minor
             Fix For: 2.0.0-M2


When there is only one service and the service is being activated and 
deactivated repetitively, ScheduledThreadPoolExecutor keeps being created and 
destructed by IdleStatusChecker, which causes big overhead.  This becomes a 
real problem when a user uses a Connector to maintain just one connection, 
which is opened and closed very frequently, because the activation and the 
deactivation of the service follows the creation and the destruction of a 
session.

The solution is make the life cycle of IdleStatusChecker thread to follow the 
life cycle of respective services.  For now, IdleStatusChecker is a singleton 
and manages threads by itself.  By moving all thread management code to 
AbstractIoService, IdleStatusChecker doesn't need to start and stop thread 
excessively but AbstractIoService will stop the thread when dispose() is called 
explicitly by user, like other worker threads.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to