コード例 #1
0
ファイル: Queue.java プロジェクト: fujibee/hudson
 @Override
 public boolean cancel(boolean mayInterruptIfRunning) {
   Queue q = Hudson.getInstance().getQueue();
   synchronized (q) {
     if (executor != null) {
       if (mayInterruptIfRunning) executor.interrupt();
       return mayInterruptIfRunning;
     }
     return q.cancel(task);
   }
 }
コード例 #2
0
 @Override
 public boolean cancel(boolean mayInterruptIfRunning) {
   Queue q = Jenkins.getInstance().getQueue();
   synchronized (q) {
     synchronized (this) {
       if (!executors.isEmpty()) {
         if (mayInterruptIfRunning) for (Executor e : executors) e.interrupt();
         return mayInterruptIfRunning;
       }
       return q.cancel(task);
     }
   }
 }