diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-10-20 16:21:29 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-10-20 16:21:29 +0000 |
commit | 5a817fdbf7652f5ab18c011eea405363507261fe (patch) | |
tree | bdb440a85f00d668f855c9b413baf6f03a3bf90e /src/actors/scala/actors/threadpool/AbstractCollection.java | |
parent | feb088b2bc8a3e78d1f8ac32b540b78a5b9c01d6 (diff) | |
download | scala-5a817fdbf7652f5ab18c011eea405363507261fe.tar.gz scala-5a817fdbf7652f5ab18c011eea405363507261fe.tar.bz2 scala-5a817fdbf7652f5ab18c011eea405363507261fe.zip |
Do not use ForkJoinPool when running on IBM J9;...
Do not use ForkJoinPool when running on IBM J9; in this case use 1.5
ThreadPoolScheduler.
Diffstat (limited to 'src/actors/scala/actors/threadpool/AbstractCollection.java')
-rw-r--r-- | src/actors/scala/actors/threadpool/AbstractCollection.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/actors/scala/actors/threadpool/AbstractCollection.java b/src/actors/scala/actors/threadpool/AbstractCollection.java new file mode 100644 index 0000000000..f3dc1e1292 --- /dev/null +++ b/src/actors/scala/actors/threadpool/AbstractCollection.java @@ -0,0 +1,32 @@ +/* + * Written by Dawid Kurzyniec, based on public domain code written by Doug Lea + * and publictly available documentation, and released to the public domain, as + * explained at http://creativecommons.org/licenses/publicdomain + */ + +package scala.actors.threadpool; +import scala.actors.threadpool.helpers.Utils; + +/** + * Overrides toArray() and toArray(Object[]) in AbstractCollection to provide + * implementations valid for concurrent collections. + * + * @author Doug Lea + * @author Dawid Kurzyniec + */ +public abstract class AbstractCollection extends java.util.AbstractCollection { + + /** + * Sole constructor. (For invocation by subclass constructors, typically + * implicit.) + */ + protected AbstractCollection() { super(); } + + public Object[] toArray() { + return Utils.collectionToArray(this); + } + + public Object[] toArray(Object[] a) { + return Utils.collectionToArray(this, a); + } +} |