random streams
Doug Lea
dl at cs.oswego.edu
Thu Jan 3 03:52:32 PST 2013
On 12/31/12 14:49, Brian Goetz wrote:
>> How about ONLY adding to TLR?
>
> Several potential objections come to mind:
> - The above TLR formulation puts a ThreadLocal.get on the path to every random
> number. Is that an overhead we need to impose on the serial case just so people
> don't shoot themselves in the foot in the parallel case?
BTW, this issue may go away. On the todo list is to
place this and others into package-private
j.u.c.ConsolidatedThreadLocal, and then explore
adding a direct link to it in class Thread.
(The consolidation will help deal with an increasing
number of TLs used in basically similar ways in
different classes. Some of these could use exactly the
same fields so would reduce footprint.)
-Doug
More information about the lambda-libs-spec-experts
mailing list