Consider making TerminatingThreadLocal public

Alan Bateman Alan.Bateman at
Thu Jul 26 10:08:38 UTC 2018

On 26/07/2018 10:45, Andrew Dinn wrote:
> :
> Firstly, if you look back through the core-libs-dev archive you will
> find discussion that preceded introduction of this change -- primarily
> between Alan Bateman and Tony Printezis as I recall but I think others
> were involved. I believe that discussion included debate as to how this
> change ought to expose the new capability either as a restricted API
> (internal to JDK runtime) or as an external API (open to JDK client
> apps). Its clear what the conclusion was.
Thanks Andrew. Yes, there was lengthy discussion here, mostly Tony, 
Peter Levart and I. We decided not to expose anything at this time, an 
approach that does not preclude re-visiting it in the future. In general 
it would need a lot of consideration, esp. when you think about cases 
where a thread local maintains an object with a reference to a native 
resource and the object is reachable by other means. We also need to 
think about what it would mean further down the road if/when the 
platform is retrofitted to support fibers as there will have 
implications for what we know today as thread locals.


More information about the core-libs-dev mailing list