Skip to content

Commit 1dc13c9

Browse files
committed
Apply patch https://git.eclipse.org/c/56954/7 to org.eclipse.core.jobs
1 parent e0c8002 commit 1dc13c9

4 files changed

Lines changed: 15 additions & 37 deletions

File tree

  • third_party/patches

third_party/patches/mars/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ else if (state != Job.NONE)
288288
} finally {
289289
if (interrupted)
290290
Thread.currentThread().interrupt();
291-
//only update the lock state if we ended up using the thread job that was given to us
292-
waitEnd(threadJob, threadJob == result, monitor);
293-
if (threadJob == result) {
291+
ISchedulingRule resultRule = result.getRule();
292+
ISchedulingRule threadJobRule = threadJob.getRule();
293+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
294+
waitEnd(threadJob, containsRule, monitor);
295+
if (containsRule) {
294296
if (waiting)
295297
manager.implicitJobs.removeWaiting(threadJob);
296298
}

third_party/patches/neon/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ else if (state != Job.NONE)
288288
} finally {
289289
if (interrupted)
290290
Thread.currentThread().interrupt();
291-
//only update the lock state if we ended up using the thread job that was given to us
292-
waitEnd(threadJob, threadJob == result, monitor);
293-
if (threadJob == result) {
291+
ISchedulingRule resultRule = result.getRule();
292+
ISchedulingRule threadJobRule = threadJob.getRule();
293+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
294+
waitEnd(threadJob, containsRule, monitor);
295+
if (containsRule) {
294296
if (waiting)
295297
manager.implicitJobs.removeWaiting(threadJob);
296298
}

third_party/patches/oxygen/org.eclipse.core.jobs/pom.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

third_party/patches/oxygen/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,11 @@ else if (state != Job.NONE)
303303
manager.getLockManager().removeLockWaitThread(currentThread, threadJob.getRule());
304304
}
305305
} finally {
306-
//only update the lock state if we ended up using the thread job that was given to us
307-
waitEnd(threadJob, threadJob == result, monitor);
308-
if (threadJob == result) {
306+
ISchedulingRule resultRule = result.getRule();
307+
ISchedulingRule threadJobRule = threadJob.getRule();
308+
boolean containsRule = resultRule != null && threadJobRule != null && resultRule.contains(threadJobRule);
309+
waitEnd(threadJob, containsRule, monitor);
310+
if (containsRule) {
309311
if (waiting)
310312
manager.implicitJobs.removeWaiting(threadJob);
311313
}

0 commit comments

Comments
 (0)