Code example for SynchronousQueue

 * to ensure locked editing contexts are unlocked at the end of a task. 
public class ERXExecutorService { 
	private static final ExecutorService _executorService = new ERXTaskThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, 
					TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new ERXTaskThreadFactory()); 
	/** @return a global ExecutorService with no limit for executing runnables. */ 
	public static ExecutorService executorService() { 
		return _executorService; 
Experience pair programming with AI  Get Codota for Java