I've noticed that the following code block :
final Lock s = new ReentrantLock();
for(int i = 0 ; i < 1000 ; i++)
{
s.lock();
System.out.println(i+" :" +s.tryLock()+" ");
}
Prints :
0 :true
1 :true
2 :true
3 :true
...
This is odd - I would expect the successive locks to fail , since s is never unlocked.
Any inisghts here ?