org.catools.common.concurrent.CThreadRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-concurrent Show documentation
Show all versions of common-concurrent Show documentation
The common concurrent objects which use in all other CATools projects
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