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

Michael McCandless commented on LUCENE-2156:
--------------------------------------------

You're right!  AtomicBoolean is overkill...

Hmm, I think even volatile is overkill -- ensureOpen is only on a "best effort" 
basis; it makes no guarantee that it will be "immediate".  So I'll revert the 
changes to IndexWriter and remove the "synchronized" from ensureOpen.

> use AtomicInteger/Boolean to track IR.refCount and IW.closed
> ------------------------------------------------------------
>
>                 Key: LUCENE-2156
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2156
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LUCENE-2156.patch
>
>
> Less costly than synchronized methods we have now...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to