diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-12-02 22:09:29 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-12-02 22:09:29 +0000 |
commit | 7bee4c499d44cc31c401c7f8dc3e22e27e71703d (patch) | |
tree | 0460646898cf975f1d09073a1cb48bc56043d7fd /test/pending | |
parent | 6995333a275d0d403869a1cd9d7e92b530bd0e86 (diff) | |
download | scala-7bee4c499d44cc31c401c7f8dc3e22e27e71703d.tar.gz scala-7bee4c499d44cc31c401c7f8dc3e22e27e71703d.tar.bz2 scala-7bee4c499d44cc31c401c7f8dc3e22e27e71703d.zip |
Moved non-deterministic test for see #1801 to p...
Moved non-deterministic test for see #1801 to pending.
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/jvm/t1801.check | 6 | ||||
-rw-r--r-- | test/pending/jvm/t1801.scala | 31 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/pending/jvm/t1801.check b/test/pending/jvm/t1801.check new file mode 100644 index 0000000000..bf78a99db9 --- /dev/null +++ b/test/pending/jvm/t1801.check @@ -0,0 +1,6 @@ +0 +100 +200 +300 +400 +done! diff --git a/test/pending/jvm/t1801.scala b/test/pending/jvm/t1801.scala new file mode 100644 index 0000000000..6ed7c56336 --- /dev/null +++ b/test/pending/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 + } +} |