RFR: 8003246: Add Supplier to ThreadLocal
akhil.arora at oracle.com
Thu Dec 6 17:01:55 UTC 2012
On 12/06/2012 03:32 AM, Doug Lea wrote:
> These seem like really good reasons to implement as you
> suggested in last post, with a static factory that uses a non-public
> *final* subclass that wires initialValue to supplier call,
> and not otherwise modifying the ThreadLocal class.
> It has the added benefit of, by not touching ThreadLocal,
> guaranteeing that it is time/space-neutral for other existing
> uses. Which also means that any future time/space improvements
> in ThreadLocal will not need to be constrained by this change.
> Jim/Akhil, could you please redo it this way?
redone - http://cr.openjdk.java.net/~akhil/8003246.1/webrev/
More information about the core-libs-dev