The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: "John Cowan" <johnwco...@gmail.com>
Date: Thu, 3 Apr 2008 19:26:21 -0400
Local: Thurs, Apr 3 2008 7:26 pm
Subject: Re: [jvm-l] Re: Performance characteristics of mutable static primitives?
On Thu, Apr 3, 2008 at 7:01 PM, John Rose <John.R...@sun.com> wrote: That's what I had hoped, but the JLS doesn't actually seem to guarantee this. > Yes. You can then cast it to the subclass and go on from there. > > If so, that provides a different approach I don't understand how that can be, as I can create as many > > to thread-local state, where the state is held in the instance > > variables of MyThread objects, and the JVM is used to thread them > > through :-) the code until the point where they're needed. > That's how Java thread locals are implemented in the JVM. ThreadLocals as I want. They can't all fit in the Thread object, surely. And how can reference to them be fast if they have to indirect through a Thread subclass object? > You can only use this approach if (a) you control the creation of the That's what I had in mind. > thread and can specify your own subclass for it, > You might be interested to know that Hotspot intrinsifies Good. > Thread.currentThread to a couple of instructions; it's cheap. We did > that to make things like thread locals efficient. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||