Added pessimistic locking in several places to shut down deadlocks.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3252 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-26 16:43:35 +00:00
parent 64288d531d
commit c6dfeb1c9d
10 changed files with 72 additions and 31 deletions

View File

@@ -51,6 +51,7 @@ class AVMTester implements Runnable
private List<String> fAllFiles;
private static boolean fgFrozen = false;
private static int fgOpCount = 0;
/**
* The operation table.
@@ -239,6 +240,7 @@ class AVMTester implements Runnable
snapshot();
break;
}
IncCount();
}
System.out.println(fAllPaths.size() + " fses in " + (System.currentTimeMillis() - startTime) +
"ms");
@@ -615,4 +617,14 @@ class AVMTester implements Runnable
{
return fAllPaths.get(fgRandom.nextInt(fAllPaths.size()));
}
private static synchronized void IncCount()
{
++fgOpCount;
}
public static synchronized int GetCount()
{
return fgOpCount;
}
}