boicehuang commented on code in PR #816:
URL: https://github.com/apache/lucene/pull/816#discussion_r854857934


##########
lucene/core/src/java/org/apache/lucene/util/CloseableThreadLocal.java:
##########
@@ -123,12 +121,27 @@ public void close() {
     // Clear the hard refs; then, the only remaining refs to
     // all values we were storing are weak (unless somewhere
     // else is still using them) and so GC may reclaim them:
-    hardRefs = null;
-    // Take care of the current thread right now; others will be
-    // taken care of via the WeakReferences.
-    if (t != null) {
-      t.remove();
+    perThreadValues = null;

Review Comment:
   @rmuir  Fixed, thanks! Can you help to review again? Appreciated! 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to