/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.common.queue;

import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author 田平 create 2019年3月1日下午3:29:47
 */
public class FQThreadFactory implements ThreadFactory {

	private final AtomicInteger nextId = new AtomicInteger();

	/**
	 * @see java.util.concurrent.ThreadFactory#newThread(java.lang.Runnable)
	 */
	@Override
	public Thread newThread(Runnable r) {
		return new Thread(r, "FastQueue-Thread-" + nextId.incrementAndGet());
	}

}
