All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wtf.metio.memoization.tck.TestSupport Maven / Gradle / Ivy

There is a newer version: 2024.1.8
Show newest version
/*
 * SPDX-FileCopyrightText: The memoization.java Authors
 * SPDX-License-Identifier: 0BSD
 */

package wtf.metio.memoization.tck;

public final class TestSupport {

    public static final int DEFAULT_RUNS = 5;
    public static final int DEFAULT_WAIT = 1000;

    private TestSupport() {
        // utility class
    }

    public static void threadedRun(final int threadCount, final Runnable runnable) {
        Thread[] threads = new Thread[threadCount];

        for (int i = 0; i < threadCount; i++) {
            threads[i] = new Thread(runnable);
        }

        for (int i = 0; i < threadCount; i++) {
            threads[i].start();
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy