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

Dawid Weiss commented on LUCENE-6129:
-------------------------------------

Yeah, my wording wasn't too accurate. Each thread will have an associated 
unique instance of the Thread class and this instance is always returned for 
currentThread(). I actually took some time to look up where this is stated in 
the jls... and couldn't find any explicit reference. The only one I did find is 
this one, which I think is equivalent.

http://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html
{blockquote}
"Threads are represented by the Thread class. The only way for a user to create 
a thread is to create an object of this class; *each thread is associated with 
such an object*."
{blockquote}

> Assert that terms enums, docs enums and doc values are not leaked across 
> threads
> --------------------------------------------------------------------------------
>
>                 Key: LUCENE-6129
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6129
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6129.patch
>
>
> Terms enums, docs enums and doc values should only be consumed in the thread 
> that they have been acquired in. We could add checks to Asserting* to make 
> sure they never leak?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to