[concurrency-interest] More control on 'full' with blockingqueue.

Tim Peierls tim at peierls.net
Sun Aug 7 12:36:57 EDT 2005

Peter Veentjer - Anchor Men wrote:
> Another thing I was wondering about, is why final class fields are places 
> in local variables? Functionally they are equivalent so the only reason I 
> can think of is that it would be faster. But isn`t this an optimalisation 
> the compiler could do (if it is faster)?

Doug Lea once explained it like this: "... it is a hack to work around a 
hotspot [limitation].  It currently doesn't understand that a final field can 
be cached across a code block."


More information about the Concurrency-interest mailing list