geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-3707) use Executor rather than ExecutorService for thread pools that are passed into AsyncHttpClient
Date Fri, 14 Dec 2007 21:37:43 GMT
use Executor rather than ExecutorService for thread pools that are passed into AsyncHttpClient
----------------------------------------------------------------------------------------------

                 Key: GERONIMO-3707
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3707
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: AsyncHttpClient
    Affects Versions: 1.x
            Reporter: Sangjin Lee
            Priority: Minor


Currently AsyncHttpClient takes an ExecutorService as an argument for the thread pool that
gets passed into the SocketConnector constructor.  Also, it uses ExecutorService as the type
for the event thread pool which is passed to the ExecutorFilter.

In both cases, Mina APIs actually take simply Executor.  Therefore, it is possible to simply
pass in Executor rather than ExecutorService.  This is very helpful because the caller may
need to retrofit existing thread pool implementations.  Implementing Executor is considerably
easier than ExecutorService.

One implication of this change is that AsyncHttpClient will no longer "own" and manage the
thread pool that gets passed in.  I believe that is also OK as the caller can (and perhaps
should) handle the lifecycle of a thread pool that it created.

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


Mime
View raw message