You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2014/12/22 19:15:13 UTC

[jira] [Comment Edited] (LUCENE-6129) Assert that terms enums, docs enums and doc values are not leaked across threads

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

Dawid Weiss edited comment on LUCENE-6129 at 12/22/14 6:14 PM:
---------------------------------------------------------------

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
{quote}
"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*."
{quote}


was (Author: dweiss):
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org