Permalink
Browse files

Implement Channel.list, as per new spec

  • Loading branch information...
1 parent 82269bd commit 7027cd9988fae811a50f4c98b3fd2b0207979f87 @lizmat lizmat committed Nov 15, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/vm/jvm/core/Channel.pm
View
9 src/vm/jvm/core/Channel.pm
@@ -91,6 +91,15 @@ my class Channel {
}
}
+ method list() {
+ gather loop {
+ winner {
+ when self { take $_ }
+ when self.closed { last }
+ }
+ }
+ }
+
method close() {
$!closed = 1;
$!queue.add($interop.sixmodelToJavaObject(CHANNEL_CLOSE))

0 comments on commit 7027cd9

Please sign in to comment.