dnet-applications/dhp-broker-application/.svn/pristine/2b/2bf39f0338246d3f260d433813c...

25 lines
455 B
Plaintext

package eu.dnetlib.lbs.utils;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Component;
@Component
public class ThreadManager {
private final List<Thread> threads = new ArrayList<>();
public void newThread(final String name, final Runnable r) {
final Thread thread = new Thread(r, name);
this.threads.add(thread);
thread.start();
}
public List<Thread> getThreads() {
return this.threads;
}
}