package com.ht.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public enum WorkQueue {
	INSTANCE;
	
	private ExecutorService threadPool = Executors.newCachedThreadPool();

	public ExecutorService getThreadPool() {
		return threadPool;
	}
	
	public void execute(Runnable r) {
		threadPool.execute(r);
	}

	public void stop() {
		threadPool.shutdown();
	}
}