[concurrency-interest] Java 7 try-with-resources on j.u.c.locks.Lock

Dávid Karnok akarnokd at gmail.com
Wed Feb 23 05:01:44 EST 2011


Hi!

Is there a chance the new Java 7 try-with-resources operator will be
supported by the standard Lock interface and/or implementations? E.g.,
writing simply

try (lock.lock()) {
   // do work
}

because lock() returns an AutoCloseable instance, or this kind of
functionality will be deferred to 3rd party libraries with nice long static
utility class names and method names?

Regards,

David Karnok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110223/8f058c3c/attachment.html>


More information about the Concurrency-interest mailing list