Skip to content
Advertisement

Tag: locking

Actual use of lockInterruptibly for a ReentrantLock

What do you actually use for this method lockInterruptibly? I have read the API however it’s not very clear to me. Could anybody express it in other words? Answer The logic is the same as for all interruptible blocking methods: it allows the thread to immediately react to the interrupt signal sent to it from another thread. How this particular

Simple Java name based locks?

MySQL has a handy function: SELECT GET_LOCK(“SomeName”) This can be used to create simple, but very specific, name-based locks for an application. However, it requires a database connection. I have …

Advertisement