Getting Back on That Concurrency Horse

After a lot of work on Mint, I’m now focusing on the concurrent unit testing project again. I had to fight some apparent code rot, which was probably caused by changes from Java 5 to Java 6, but now everything is working again.

I have a nice example that shows that double-checked locking is broken. With a yield probability of 0.5 and yields in all places (thread start, thread run, thread exit, thread join, before notifies, after notifies, before waits, after waits, before synchronized and after synchronized), it usually shows up in under 10 iterations.

It would be nice to have a simpler way of setting these parameters, e.g. by using an annotation on the test:

@Test(yieldProb=0.5, beforeSynchronized=false)
public void testFoo() { ... }


About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Concurrent Unit Testing. Bookmark the permalink.

Leave a Reply