--- On Fri, 3/12/10, Adam Heath <doo...@brainfood.com> wrote:
> Search for synchronized in
> ShoppingCart.  You'll fine a couple of
> spots that lock on cartLines, a few that lock in the class
> instance
> itself.  But then no other hits.
> 
> However, tons of internal variables all need to be kept
> self-consistent with each other, so locking against just
> one or the
> other of those variables won't work.

These same problems exist in a number of classes - not just the shopping cart 
(take a look at SequenceUtil for some really scary code). That's why I 
suggested a synchronization best practices page that the community can follow.

-Adrian




Reply via email to