Follow

Java’s Lock interface provides the methods lock and lockInterruptably, the former not responding even to user interrupts.

In what world would I ever want to lock non-interruptably?

Now that I’m trying to work with the API, this seems like a dumb question. Checked exceptions are too burdensome.

Show thread

@qbit now that I’m actually trying to use it, I think you’d want to avoid LockInterruptably in pretty much any business logic. It throws a checked exception. That’s also kind of weird (seems like a user interrupt is a clear runtime exception to me).

Sign in to participate in the conversation
Mastodon

A private Mastodon instance