Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 296056 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/core/internal/jobs/ThreadJob.java (-4 / +11 lines)
Lines 202-209 Link Here
202
			try {
202
			try {
203
				manager.reportBlocked(monitor, blockingJob);
203
				manager.reportBlocked(monitor, blockingJob);
204
				while (true) {
204
				while (true) {
205
					if (isCanceled(monitor))
205
					// just return if lock listener decided to grant immediate access
206
						throw new OperationCanceledException();
206
					if (manager.getLockManager().aboutToWait(blocker)) {
207
						//only return if the runner wasn't already done
208
						if (runner.shutdown())
209
							return this;
210
					}
211
					if (isCanceled(monitor)) {
212
						// only return if the runner wasn't already done
213
						if (runner.shutdown())
214
							throw new OperationCanceledException();
215
					}
207
					synchronized (runner.getNotifier()) {
216
					synchronized (runner.getNotifier()) {
208
						if (runner.isFinished())
217
						if (runner.isFinished())
209
							break;
218
							break;
Lines 257-264 Link Here
257
				manager.beginMonitoring(this, monitor);
266
				manager.beginMonitoring(this, monitor);
258
			final Thread currentThread = Thread.currentThread();
267
			final Thread currentThread = Thread.currentThread();
259
268
260
			// Check all conditions under the manager.lock. Anything that can
261
			// cause a change in any condition must also notify() the lock.
262
			// Invoke aboutToWait() once per newly discovered blocker. 
269
			// Invoke aboutToWait() once per newly discovered blocker. 
263
			// aboutToWait() must be called without holding any locks.
270
			// aboutToWait() must be called without holding any locks.
264
			while (true) {
271
			while (true) {

Return to bug 296056