diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2009-12-16 16:16:09 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2009-12-16 16:16:09 +0000 |
commit | a8dc5cbdaccfae57983aac45fba75a261e052fcd (patch) | |
tree | 1952ea0b2b628406bf3eb0492c8426e0bc06a924 /test/files | |
parent | 5330b36a5b0e9463f2d538991fa520abaecff6f2 (diff) | |
download | scala-a8dc5cbdaccfae57983aac45fba75a261e052fcd.tar.gz scala-a8dc5cbdaccfae57983aac45fba75a261e052fcd.tar.bz2 scala-a8dc5cbdaccfae57983aac45fba75a261e052fcd.zip |
Reverting r19988 (restoring test for #1801).
No review.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/jvm/t1801.check | 6 | ||||
-rw-r--r-- | test/files/jvm/t1801.scala | 31 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/files/jvm/t1801.check b/test/files/jvm/t1801.check new file mode 100644 index 0000000000..bf78a99db9 --- /dev/null +++ b/test/files/jvm/t1801.check @@ -0,0 +1,6 @@ +0 +100 +200 +300 +400 +done! diff --git a/test/files/jvm/t1801.scala b/test/files/jvm/t1801.scala new file mode 100644 index 0000000000..6ed7c56336 --- /dev/null +++ b/test/files/jvm/t1801.scala @@ -0,0 +1,31 @@ +import scala.actors.Actor._ + +object Test { + val rt = Runtime.getRuntime() + val sender = actor { + var cnt = 0 + while(cnt < 500) { + if ((cnt % 100) == 0) println(cnt) + receiver ! new Array[Int] (148576) + cnt += 1 + //println ("Used Mem: " + (((rt.totalMemory() - rt.freeMemory()) / 1048576.) formatted "%.2f") + " Mb") + } + receiver ! 'exit + } + + val receiver = actor { + loop { + react { + case x: Array[Int] => ()//println ("received " + x.length) + case 'exit => { + println("done!") + exit() + } + } + } + } + + def main (args: Array[String]) { + sender + } +} |