commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-501) Add support for background initialization
Date Wed, 06 May 2009 19:54:30 GMT

    [ https://issues.apache.org/jira/browse/LANG-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706567#action_12706567
] 

Oliver Heger commented on LANG-501:
-----------------------------------

I think that {{fetchTemporaryExecutor()}} is not synchronized is not a big problem as the
method is package private (and in {{BackgroundInitializer}} it is only called from synchronized
blocks). I assume that we have control over the classes in this package and will detect an
incorrect use of this method - maybe a bit naive.

Nevertheless the reason for this method and the {{temporaryExecutor}} field was the thought
that another specialized {{BackgroundInitializer}} implementation - namely the {{MultiBackgroundInitializer}}
mentioned above - could extend this class and override some of the methods to adapt their
behavior. But maybe this is not needed. I hope I can put some code together in a couple of
days for an initial implementation. In the ideal case we can get rid of {{fetchTemporaryExecutor()}}
and simplify the implementation.

> Add support for background initialization
> -----------------------------------------
>
>                 Key: LANG-501
>                 URL: https://issues.apache.org/jira/browse/LANG-501
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Oliver Heger
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: BackgroundInitializer.patch
>
>
> This is a suggestion to add a {{BackgroundInitializer}} class that  allows initializing
an object in a background task. {{BackgroundInitializer}} is a thin wrapper around a {{java.util.concurrent.Future}}
object and uses an {{ExecutorService}} for starting a background task that performs initialization.

-- 
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