summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2009-05-27 15:49:35 +0000
committerPhilipp Haller <hallerp@gmail.com>2009-05-27 15:49:35 +0000
commit76e6f41e6d409850f47404277ba30c21579c2cb3 (patch)
tree24b0e477e24d5c1bc2fe2df4ff3118d2d916ea34 /test/files/jvm
parent07eef107992887d539a23c4f34a4d6b8c6a4a8f7 (diff)
downloadscala-76e6f41e6d409850f47404277ba30c21579c2cb3.tar.gz
scala-76e6f41e6d409850f47404277ba30c21579c2cb3.tar.bz2
scala-76e6f41e6d409850f47404277ba30c21579c2cb3.zip
Moved actorgc_leak test to pending, because it ...
Moved actorgc_leak test to pending, because it fails (only) on Windows.
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/actorgc_leak.check1
-rw-r--r--test/files/jvm/actorgc_leak.scala63
2 files changed, 0 insertions, 64 deletions
diff --git a/test/files/jvm/actorgc_leak.check b/test/files/jvm/actorgc_leak.check
deleted file mode 100644
index a965a70ed4..0000000000
--- a/test/files/jvm/actorgc_leak.check
+++ /dev/null
@@ -1 +0,0 @@
-Done
diff --git a/test/files/jvm/actorgc_leak.scala b/test/files/jvm/actorgc_leak.scala
deleted file mode 100644
index 5e2b9d51e1..0000000000
--- a/test/files/jvm/actorgc_leak.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-
-import scala.actors.Actor
-
-object Test {
- class FatActorFactory extends Actor {
- def act() {
- var cnt = 0
- Actor.loopWhile(cnt < fatActors) {
- //if ((cnt % 5) == 0) println(cnt)
- val fa = new FatActor()
- fa.start()
- cnt += 1
- if (cnt == fatActors) Monitor ! 'done
- }
- }
- }
-
- class FatActor extends Actor {
- def act() {
- fat = new Array[Int](fatness)
- react {
- case 'hi => exit()
- }
- }
- private var fat: Array[Int] = _
- }
-
- object Monitor extends Actor {
- private var cnt = 0
- def act() {
- Actor.loop {
- react {
- case 'done => {
- cnt += 1
- if (cnt == factories) System.exit(0) // once GC pressure stops FatActors stop being collected, and as
- } // a result ActorGC never finds out that they are defunct
- }
- }
- }
- }
-
- val factories = 4 // the number of factories to start
- val fatActors = 50 // the number of FatActors for each factory to produce
- val fatness = 1024*1024*10
-
- def main(args: Array[String]) {
- scala.actors.Scheduler.impl.shutdown()
- val sched = {
- val s = new scala.actors.FJTaskScheduler2
- s.start()
- s
- }
- scala.actors.Scheduler.impl = sched
-
- Monitor.start()
- for(i <- 1 to factories) {
- //if ((i % 50) == 0) println(i)
- val fa = new FatActorFactory()
- fa.start()
- }
- println("Done")
- }
-}