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

org.catools.common.concurrent.CThreadRunner Maven / Gradle / Ivy

The newest version!
package org.catools.common.concurrent;

import java.util.concurrent.Executors;

/**
 * Thread related methods can be find here
 */
public class CThreadRunner {
    /**
     * Perform action in parallel concurrent
     *
     * @param task to be perform
     * @return the concurrent object for farther usage
     */
    public static Thread run(Runnable task) {
        Thread thread = Executors.defaultThreadFactory().newThread(task);
        thread.start();
        return thread;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy