On dinsdag, jun 17, 2003, at 21:36 Europe/Amsterdam, Michel Pelletier wrote:
Maybe I did this wrong, but aren't the two (and Greg's "synchronized class") all susceptible to this problem and it's not specificly a failure of the 'synchronize' keyword?
Yes, all mechanisms are susceptible to the same problem, they're
probably all three functionally equivalent (i.e. anything you can code
with one you can code with the other).
The point I'm trying to make is that designing your locks is hard work
especially if there are many locks. Let's for the sake of argument say
that the amount of work to get things right is quadratic in the number
of locks. This means that any language construct that invites people to
create many locks will make it more difficult to get the code right.
I realise the argument I make sound pedantic (let's not make it too
easy to do locking, so that only people who know what they're doing
will use locking), but that's the way I actually do feel about the
subject.
--
- Jack Jansen