lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4281) Delegate to default thread factory in NamedThreadFactory
Date Thu, 02 Aug 2012 08:17:04 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427164#comment-13427164
] 

Dawid Weiss commented on LUCENE-4281:
-------------------------------------

I actually banned all methods from Executors that take the default thread factory in a patch
where thread leaks are detected. It was for a reason -- when trying to debug thread leaks
it is virtually impossible to tell where a thread originated from because the default thread
factory has a naming pattern that plain sucks. I'd insist that we don't use this:

{code}
+  private static final ThreadFactory FACTORY = Executors.defaultThreadFactory();
{code}

and rely on Lucene's NamedThreadFactory instead (passing a base name that at least tries to
indicate what a given threadpool does).
                
> Delegate to default thread factory in NamedThreadFactory
> --------------------------------------------------------
>
>                 Key: LUCENE-4281
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4281
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 3.6.1, 4.0, 5.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0, 5.0, 3.6.2
>
>         Attachments: LUCENE-4281.patch
>
>
> currently we state that we yield the same behavior as Executors#defaultThreadFactory()
but this behavior could change over time even if it is compatible. We should just delegate
to the default thread factory instead of creating the threads ourself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message