Lines Matching defs:runnable
28 * <p>A list of ({@code Runnable}, {@code Executor}) pairs that guarantees
29 * that every {@code Runnable} that is added using the add method will be
31 * {@code Runnable}s added after {@code run} is called are still guaranteed to
38 public class ExecutionList implements Runnable {
44 // The list of runnable,executor pairs to execute. Only modified within
53 * Add the runnable/executor pair to the list of pairs to execute. Executes
56 public void add(Runnable runnable, Executor executor) {
61 Preconditions.checkNotNull(runnable, "Runnable was null.");
71 runnables.add(new RunnableExecutorPair(runnable, executor));
77 // Execute the runnable immediately. Because of scheduling this may end up
82 executor.execute(runnable);
99 // At this point the runnable list will never be modified again, so we are
107 final Runnable runnable;
110 RunnableExecutorPair(Runnable runnable, Executor executor) {
111 this.runnable = runnable;
117 executor.execute(runnable);
119 // Log it and keep going, bad runnable and/or executor. Don't
122 LOG.log(Level.SEVERE, "RuntimeException while executing runnable "
123 + runnable + " with executor " + executor, e);