Hi,
when adding InheritableThreadLocal to libgcj I found a small bug.
When you would call get() from within an overridden childValue()
method the heritage set would be modified while in the process of
being iterated in the newChildThread() method. This has been
fixed by the following patch which I have checked in.
* java/lang/InheritableThreadLocal.java (addToHeritage): check if this
local is already contained in the heritage before adding it.
Cheers,
Mark
-- classpath/classpath/java/lang/InheritableThreadLocal.java 2000/05/30
22:02:34 1.1
+++ classpath/classpath/java/lang/InheritableThreadLocal.java 2001/10/02
22:27:22 1.2
@@ -122,7 +122,9 @@
threadMap.put(currentThread, heritage);
}
}
- heritage.add(this);
+ if (!heritage.contains(this)) {
+ heritage.add(this);
+ }
}
/**
--
Stuff to read:
<http://www.toad.com/gnu/whatswrong.html>
What's Wrong with Copy Protection, by John Gilmore
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath