[concurrency-interest] Re: Custom Locks

Luís Eduardo V. Matta levmatta@uol.com.br
Fri, 21 Nov 2003 00:42:16 -0200

To clarify my position, I will answer some selected questions and add a few:

> Why would you want to override this? (checkOwner(Thread t)) //Larry
         To my knowledge: to manipulate locks owned be other threads (be
ignoring inherited behavior)

> what sort of extensions does anyone see to things like ReentrantLock?
        Things like: imposing prioraty inversion, revoking in favor of very
important processes (emergency routines)

Please remember that I proposed a level os abstract classes for
customizations, and I believe locks classes shoud be final or as final as
possible, for security reasons. The current  implementation already has most
of its structure private or package private, this is part of my concern.

David Holmes made a very good point about using delegation insted of
extention. I don't think the API is prepared for that also, but I have no
suggestions (for implementation or usage). He also wrote about getting bug
reports from users of the code, I have a strong position about that:
      This will be a part of the JDK, adoption depends on how usefull it is
(specially to high end developers and researchers - and they will need to
customize it).
      (I mean no disrespect)

Finally, I'm assuming that developers will whant to customize behavior NOT
algoritms. This is why a asked for friendlier classes.

Thanks every body,

PS: I will send on another e-mail other requests