[concurrency-interest] @Contended (JEP-142)
stanimir at riflexo.com
Thu Nov 29 06:40:37 EST 2012
Problem w/ sun.misc is that it requires security permissions on runtime
whilst it's an absolutely harmless operation. To avoid that people will
just keep padding like it's done now - i.e. nothing achieved.
For instance, I can live by extending j.u.c.atomics even it's ugly just to
avoid touching Unsafe itself (or the AtomicUpdaters)
On Thu, Nov 29, 2012 at 1:00 PM, Dr Heinz M. Kabutz <
heinz at javaspecialists.eu> wrote:
> IMHO, sun.misc.Contended is the right place for this one, as it will
> hopefully discourage people from using it, unless they really know what
> they are doing. Next you find programmers making all their fields
> "Contended", because they read on some blog that it makes things faster.
> Then instead of your object using only 32 bytes, it gets bloated to 512
> Dr Heinz M. Kabutz (PhD CompSci)
> Author of "The Java(tm) Specialists' Newsletter"
> Sun Java Champion
> IEEE Certified Software Development Professionalhttp://www.javaspecialists.eu
> Tel: +30 69 75 595 262
> Skype: kabutz
> On 11/29/12 11:11 AM, Stanimir Simeonoff wrote:
> >>Any concrete suggestion? j.u.c.Contended? j.u.c.hints.Contended?
> I'd go with "hints".
> On Thu, Nov 29, 2012 at 11:43 AM, Aleksey Shipilev <
> aleksey.shipilev at oracle.com> wrote:
>> On 11/28/2012 08:42 PM, Gregg Wonderly wrote:
>> > Going down that path, makes me feel like having it in a more "public"
>> > package would be a better choice. The name "Contended" is now going to
>> > be a "reserved" name for many people, when used in annotation form. So,
>> > why not just make it a publicly defined "annotation" which has
>> > appropriate implementation in appropriate environments?
>> Any concrete suggestion? j.u.c.Contended? j.u.c.hints.Contended?
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
> Concurrency-interest mailing listConcurrency-interest at cs.oswego.eduhttp://cs.oswego.edu/mailman/listinfo/concurrency-interest
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest