Code example for ScheduledThreadPoolExecutor

Methods: execute

0
		_generalThreadPool.execute(r);
	} 
	 
	public void executeAi(Runnable r)
	{ 
		_aiScheduledThreadPool.execute(new RunnableWrapper(r));
	} 
	 
	public String[] getStats()
	{ 
		return new String[] {
				"STP:", 
				" + Effects:", 
				" |- ActiveThreads:   " + _effectsScheduledThreadPool.getActiveCount(),
				" |- getCorePoolSize: " + _effectsScheduledThreadPool.getCorePoolSize(),
				" |- PoolSize:        " + _effectsScheduledThreadPool.getPoolSize(),
				" |- MaximumPoolSize: " + _effectsScheduledThreadPool.getMaximumPoolSize(),
				" |- CompletedTasks:  " + _effectsScheduledThreadPool.getCompletedTaskCount(),
				" |- ScheduledTasks:  " + (_effectsScheduledThreadPool.getTaskCount() - _effectsScheduledThreadPool.getCompletedTaskCount()),
				" | -------", 
Stop searching for code, let great code find you!  Add Codota to your java IDE