[concurrency-interest] Double Checked Locking in OpenJDK

Nathan Reynolds nathan.reynolds at oracle.com
Tue Aug 14 18:59:16 EDT 2012


I would hope the average programmer would simply need to know they 
should use synchronized blocks when accessing shared state.  If the lock 
becomes contended, then the experts will have to step in and figure out 
how to get rid of the lock and deal with all of these issues.

Nathan Reynolds 
<http://psr.us.oracle.com/wiki/index.php/User:Nathan_Reynolds> | 
Consulting Member of Technical Staff | 602.333.9091
Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology
On 8/14/2012 3:49 PM, Raoul Duke wrote:
> On Tue, Aug 14, 2012 at 3:36 PM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
>> I think the lesson should be avoid data races - period. :) if you find a
>> case where you can justify it (i.e. profiling/testing guided) then consider
>> it.  I bet there will be few and far in between cases like that.
> sincere, if vulgar, question: as a run-of-the-mill Joe Average
> programmer, how the heck do i even know that i've managed to avoid
> them? and if i do manage to avoid them, have i not just basically
> walked into potential, hiding, secret, waiting until after i ship to
> show up, deadlockville? (all in all, shared-mutable-state-concurrency
> seems pretty bad.)
>
> sincerely.
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20120814/51147bfa/attachment.html>


More information about the Concurrency-interest mailing list