/** * Attempts to immediately start a given job. Returns true if the job was * successfully started, and false if it could not be started immediately * due to a currently running job with a conflicting rule. Listeners will never * be notified of jobs that are run in this way. */ protected boolean runNow(InternalJob job) { synchronized (lock) { //cannot start if there is a conflicting job if (findBlockingJob(job) != null) return false; changeState(job, Job.RUNNING); job.setProgressMonitor(new NullProgressMonitor()); job.run(null); } return true; }
private InternalJob doRunNow(ThreadJob job, boolean releaseWaiting) { InternalJob blocking = findBlockingJob(job); //cannot start if there is a conflicting job if (blocking == null) { changeState(job, Job.RUNNING); ((InternalJob) job).setProgressMonitor(new NullProgressMonitor()); job.run(null); if (releaseWaiting) { // atomically release waiting implicitJobs.removeWaiting(job); } } return blocking; }
private InternalJob doRunNow(ThreadJob job, boolean releaseWaiting) { InternalJob blocking = findBlockingJob(job); //cannot start if there is a conflicting job if (blocking == null) { changeState(job, Job.RUNNING); ((InternalJob) job).setProgressMonitor(new NullProgressMonitor()); job.run(null); if (releaseWaiting) { // atomically release waiting implicitJobs.removeWaiting(job); } } return blocking; }
private InternalJob doRunNow(ThreadJob job, boolean releaseWaiting) { InternalJob blocking = findBlockingJob(job); //cannot start if there is a conflicting job if (blocking == null) { changeState(job, Job.RUNNING); ((InternalJob) job).setProgressMonitor(new NullProgressMonitor()); job.run(null); if (releaseWaiting) { // atomically release waiting implicitJobs.removeWaiting(job); } } return blocking; }
throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(this); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); ThreadJob result = this; return this; blockingJob = manager.findBlockingJob(this);
throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(threadJob); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); try {
throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(threadJob); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); try {
throw new OperationCanceledException(); InternalJob blockingJob = manager.findBlockingJob(threadJob); Thread blocker = blockingJob == null ? null : blockingJob.getThread(); try {
InternalJob blocker = findBlockingJob(job); if (blocker == null) break;
InternalJob blocker = findBlockingJob(job); if (blocker == null) break;
InternalJob blocker = findBlockingJob(job); jobGroup = job.getJobGroup();
InternalJob blocker = findBlockingJob(job); jobGroup = job.getJobGroup();