rajoshi wrote:
Which version of terracotta you are using , in the current version by default it's shared across VM's.
Rajoshi I tested in both 3.7.2 and 3.7.4. The test is very simple: Just call await in one or more nodes, and launch another an call signalAll(). The previous nodes remain blocked.
The examples I found work only with DSO:
Code:
protected Condition getCondition(final Lock lock, String name) {
Assert.assertTrue(Terracotta.isManaged(lock));
return Terracotta.lookupOrCreateRoot(name, new Callable<Condition>() {
public Condition call() throws Exception {
return lock.newCondition();
}});
}
I think that, if possible, the returned lock from writeLock() should be a Terracotta specialization with a getCondition(String name). Even in the same node newCondition() will return distinct conditions (as is expected).