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

Uwe Schindler commented on LUCENE-2822:
---------------------------------------

Hi,
it depends on the operating system. Nanotime is still offcially a syscall on 
all operating systems, but some implementations of libc make it a volatile read 
from some address space mapped into the process (e.g macos), only falling back 
to syscall if the result can't be trusted. So in general, calling it on every 
hit is still a bad idea if don't rely on it. I'd use some modulo operation and 
maybe call it every 1000 hits.

> 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 - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>            Priority: Major
>             Fix For: 3.5, 4.0-ALPHA
>
>         Attachments: LUCENE-2822.patch, LUCENE-2822.patch, LUCENE-2822.patch, 
> LUCENE-2822.patch
>
>
> 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 was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to