Code example for Executor

Methods: execute

0
			if (executor instanceof ExecutorService) {
				ExecutorService executorService = (ExecutorService) executor;
				future = executorService.submit(runnable);
			} else { 
				/* non-cancellable task */ 
				executor.execute(runnable);
			} 
		} 
		return future;
	} 
 
	/** 
	 * Execute a task after (at least) its delay <strong>and</strong> after all 
	 * tasks added with the same non-null <code>serial</code> (if any) have 
	 * completed execution. 
	 *  
	 * @param task 
	 *            the task to execute 
	 * @throws IllegalArgumentException 
	 *             if <code>task.delay</code> is strictly positive and the 
	 *             current executor does not support scheduling (if