[jboss-cvs] JBossAS SVN: r92067 - projects/jboss-threads/trunk/main/src/main/java/org/jboss/threads.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 6 11:09:49 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-08-06 11:09:49 -0400 (Thu, 06 Aug 2009)
New Revision: 92067
Modified:
projects/jboss-threads/trunk/main/src/main/java/org/jboss/threads/Dependency.java
Log:
Fix failed task handling
Modified: projects/jboss-threads/trunk/main/src/main/java/org/jboss/threads/Dependency.java
===================================================================
--- projects/jboss-threads/trunk/main/src/main/java/org/jboss/threads/Dependency.java 2009-08-06 14:44:40 UTC (rev 92066)
+++ projects/jboss-threads/trunk/main/src/main/java/org/jboss/threads/Dependency.java 2009-08-06 15:09:49 UTC (rev 92067)
@@ -98,16 +98,15 @@
private void dependencyFailed() {
final AtomicIntegerFieldUpdater<Dependency> updater = depUpdater;
final int res = updater.decrementAndGet(this);
- if (res == 0) {
- synchronized (lock) {
- state = State.FAILED;
- final Dependency.Runner runner = this.runner;
- // clear stuff out since this object will likely be kept alive longer than these objects need to be
- runner.runnable = null;
- runner.dependents = null;
- this.runner = null;
- }
- } else if (res < 0) {
+ synchronized (lock) {
+ state = State.FAILED;
+ final Dependency.Runner runner = this.runner;
+ // clear stuff out since this object will likely be kept alive longer than these objects need to be
+ runner.runnable = null;
+ runner.dependents = null;
+ this.runner = null;
+ }
+ if (res < 0) {
// oops?
updater.incrementAndGet(this);
}
More information about the jboss-cvs-commits
mailing list