[
https://issues.apache.org/jira/browse/LUCENE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135749#comment-13135749
]
Torsten Krah commented on LUCENE-2822:
--------------------------------------
Some workaround - until this one is resolved - to stop the thread (e.g. in a
container shutdown callback) may be this one using reflection:
Thread t = (Thread)
FieldUtils.readDeclaredStaticField(TimeLimitingCollector.class, "TIMER_THREAD",
true);
if (t != null && t.isAlive()) {
t.interrupt();
t.join(1000);
}
Little bit ugly but theres no other way yet.
> TimeLimitingCollector starts thread in static {} with no way to stop them
> -------------------------------------------------------------------------
>
> Key: LUCENE-2822
> URL: https://issues.apache.org/jira/browse/LUCENE-2822
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Fix For: 3.5, 4.0
>
>
> See the comment in LuceneTestCase.
> If you even do Class.forName("TimeLimitingCollector") it starts up a thread
> in a static method, and there isn't a way to kill it.
> This is broken.
--
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: [email protected]
For additional commands, e-mail: [email protected]