sumitagrawl commented on PR #5946:
URL: https://github.com/apache/ozone/pull/5946#issuecomment-1882699751

   > Thanks for making the issue notified @sumitagrawl. I think the problem 
with ThreadLocal is when threads come and go, e.g. as per ThreadPool policy, 
the associating value is not cleanup. This PR now doesn't do that kind cleanup 
as I understand.
   > 
   > Simply using `TerminatingThreadLocal` would ensure the thread local value 
is cleanup when threads exit.
   
   @duongkame Problem here is, we do not have kind of close resource where can 
do cleanup. Doing same in finalizer of java is not recommended. So I tried 
avoid using ThreadLocal itself.
   
   ThreadLocal resource can be managed in static or singleton usecase, but with 
private member, its not recommended.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to