synchronized void end(ISchedulingRule rule, boolean resume) { if (JobManager.DEBUG_BEGIN_END) JobManager.debug("End rule: " + rule); //$NON-NLS-1$ ThreadJob threadJob = threadJobs.get(Thread.currentThread()); if (threadJob == null) Assert.isLegal(rule == null, "endRule without matching beginRule: " + rule); //$NON-NLS-1$ else if (threadJob.pop(rule)) { endThreadJob(threadJob, resume); } }
synchronized void end(ISchedulingRule rule, boolean resume) { if (JobManager.DEBUG_BEGIN_END) JobManager.debug("End rule: " + rule); //$NON-NLS-1$ ThreadJob threadJob = threadJobs.get(Thread.currentThread()); if (threadJob == null) Assert.isLegal(rule == null, "endRule without matching beginRule: " + rule); //$NON-NLS-1$ else if (threadJob.pop(rule)) { endThreadJob(threadJob, resume); } }
synchronized void end(ISchedulingRule rule, boolean resume) { if (JobManager.DEBUG_BEGIN_END) JobManager.debug("End rule: " + rule); //$NON-NLS-1$ ThreadJob threadJob = (ThreadJob) threadJobs.get(Thread.currentThread()); if (threadJob == null) Assert.isLegal(rule == null, "endRule without matching beginRule: " + rule); //$NON-NLS-1$ else if (threadJob.pop(rule)) { endThreadJob(threadJob, resume); } }
synchronized void end(ISchedulingRule rule, boolean resume) { if (JobManager.DEBUG_BEGIN_END) JobManager.debug("End rule: " + rule); //$NON-NLS-1$ ThreadJob threadJob = (ThreadJob) threadJobs.get(Thread.currentThread()); if (threadJob == null) Assert.isLegal(rule == null, "endRule without matching beginRule: " + rule); //$NON-NLS-1$ else if (threadJob.pop(rule)) { endThreadJob(threadJob, resume); } }
/** * Called when a worker thread has finished running a job. At this * point, the worker thread must not own any scheduling rules * @param lastJob The last job to run in this thread */ void endJob(InternalJob lastJob) { final Thread currentThread = Thread.currentThread(); IStatus error; synchronized (this) { ThreadJob threadJob = threadJobs.get(currentThread); if (threadJob == null) { if (lastJob.getRule() != null) notifyWaitingThreadJobs(lastJob); return; } String msg = "Worker thread ended job: " + lastJob + ", but still holds rule: " + threadJob; //$NON-NLS-1$ //$NON-NLS-2$ error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, null); //end the thread job endThreadJob(threadJob, false); } try { RuntimeLog.log(error); } catch (RuntimeException e) { //failed to log, so print to console instead System.err.println(error.getMessage()); } }
/** * Called when a worker thread has finished running a job. At this * point, the worker thread must not own any scheduling rules * @param lastJob The last job to run in this thread */ void endJob(InternalJob lastJob) { final Thread currentThread = Thread.currentThread(); IStatus error; synchronized (this) { ThreadJob threadJob = threadJobs.get(currentThread); if (threadJob == null) { if (lastJob.getRule() != null) notifyWaitingThreadJobs(lastJob); return; } String msg = "Worker thread ended job: " + lastJob + ", but still holds rule: " + threadJob; //$NON-NLS-1$ //$NON-NLS-2$ error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, null); //end the thread job endThreadJob(threadJob, false); } try { RuntimeLog.log(error); } catch (RuntimeException e) { //failed to log, so print to console instead System.err.println(error.getMessage()); } }
/** * Called when a worker thread has finished running a job. At this * point, the worker thread must not own any scheduling rules * @param lastJob The last job to run in this thread */ void endJob(InternalJob lastJob) { final Thread currentThread = Thread.currentThread(); IStatus error; synchronized (this) { ThreadJob threadJob = (ThreadJob) threadJobs.get(currentThread); if (threadJob == null) { if (lastJob.getRule() != null) notifyWaitingThreadJobs(lastJob); return; } String msg = "Worker thread ended job: " + lastJob + ", but still holds rule: " + threadJob; //$NON-NLS-1$ //$NON-NLS-2$ error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, null); //end the thread job endThreadJob(threadJob, false); } try { RuntimeLog.log(error); } catch (RuntimeException e) { //failed to log, so print to console instead System.err.println(error.getMessage()); } }
/** * Called when a worker thread has finished running a job. At this * point, the worker thread must not own any scheduling rules * @param lastJob The last job to run in this thread */ void endJob(InternalJob lastJob) { final Thread currentThread = Thread.currentThread(); IStatus error; synchronized (this) { ThreadJob threadJob = (ThreadJob) threadJobs.get(currentThread); if (threadJob == null) { if (lastJob.getRule() != null) notifyWaitingThreadJobs(); return; } String msg = "Worker thread ended job: " + lastJob + ", but still holds rule: " + threadJob; //$NON-NLS-1$ //$NON-NLS-2$ error = new Status(IStatus.ERROR, JobManager.PI_JOBS, 1, msg, null); //end the thread job endThreadJob(threadJob, false); } try { RuntimeLog.log(error); } catch (RuntimeException e) { //failed to log, so print to console instead System.err.println(error.getMessage()); } }