[Swift-commit] r2388 - in trunk/src/org/griphyn/vdl/karajan: . lib

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Jan 5 03:55:50 CST 2009


Author: benc
Date: 2009-01-05 03:55:50 -0600 (Mon, 05 Jan 2009)
New Revision: 2388

Modified:
   trunk/src/org/griphyn/vdl/karajan/WrapperMap.java
   trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
Log:
some asserts about lock behaviour

Modified: trunk/src/org/griphyn/vdl/karajan/WrapperMap.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/WrapperMap.java	2009-01-05 08:49:51 UTC (rev 2387)
+++ trunk/src/org/griphyn/vdl/karajan/WrapperMap.java	2009-01-05 09:55:50 UTC (rev 2388)
@@ -57,6 +57,7 @@
 			map.put(handle, fw = new FutureWrappers());
 		}
 		if (fw.nodeWrapper == null) {
+			assert Thread.holdsLock(handle.getRoot()); // TODO should be on root or on handle?
 			fw.nodeWrapper = new DSHandleFutureWrapper(handle);
 		}
 		return fw.nodeWrapper;
@@ -68,6 +69,7 @@
 			map.put(handle, fw = new FutureWrappers());
 		}
 		if (fw.arrayWrapper == null) {
+			assert Thread.holdsLock(handle.getRoot()); // TODO should be on root or on handle?
 			fw.arrayWrapper = new ArrayIndexFutureList(handle, value);
 		}
 		return fw.arrayWrapper;

Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java	2009-01-05 08:49:51 UTC (rev 2387)
+++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java	2009-01-05 09:55:50 UTC (rev 2388)
@@ -187,6 +187,7 @@
 
 	/** The caller is expected to have synchronized on the root of var. */
 	public String[] filename(DSHandle var) throws ExecutionException, HandleOpenException {
+		assert Thread.holdsLock(var.getRoot());
 		try {
 			if (var.getType().isArray()) {
 				return leavesFileNames(var);




More information about the Swift-commit mailing list