com.anarsoft.vmlens.concurrent.junit.TestUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of concurrent-junit Show documentation
Show all versions of concurrent-junit Show documentation
A http://junit.org test runner to run concurrent unit tests.
The newest version!
package com.anarsoft.vmlens.concurrent.junit;
import java.util.LinkedList;
import java.util.List;
public class TestUtil {
public static void runMultithreaded(Runnable runnable, int threadCount) throws InterruptedException
{
List threadList = new LinkedList();
for(int i = 0 ; i < threadCount; i++)
{
threadList.add(new Thread(runnable));
}
for( Thread t : threadList)
{
t.start();
}
for( Thread t : threadList)
{
t.join();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy