summaryrefslogtreecommitdiff
path: root/test/files/run/t2417.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t2417.scala')
-rw-r--r--test/files/run/t2417.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/t2417.scala b/test/files/run/t2417.scala
index 31d4c143fa..6200e33025 100644
--- a/test/files/run/t2417.scala
+++ b/test/files/run/t2417.scala
@@ -3,7 +3,7 @@ object Test {
def parallel(numThreads: Int)(block: => Unit) {
var failure: Throwable = null
- val threads = Array.fromFunction(i => new Thread {
+ val threads = Array.tabulate(numThreads)(i => new Thread {
override def run {
try {
block
@@ -11,7 +11,7 @@ object Test {
case x => failure = x
}
}
- })(numThreads)
+ })
for (t <- threads) t.start
for (t <- threads) t.join
if (failure != null) println("FAILURE: " + failure)
@@ -74,4 +74,4 @@ object Test {
testSet(5, 2, 1000000)
println()
}
-} \ No newline at end of file
+}