summaryrefslogtreecommitdiff
path: root/tests/chain.apl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chain.apl')
-rw-r--r--tests/chain.apl13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/chain.apl b/tests/chain.apl
index b825bbb..62bc1a9 100644
--- a/tests/chain.apl
+++ b/tests/chain.apl
@@ -1,9 +1,12 @@
+send←⍈ ⍝ I can't type those easily so give them names
+recv←⍇
+
worker←{
- msg←{1 ⍵}⍇⍬
+ msg←{1 ⍵}recv ⍬
⍵≡⍬: ⎕←'DONE'
- ⎕←'Worker id ',(⍕⎕self),' got message: ',(⍕msg)
+ ⎕←'Worker id ',(⍕⎕self),' (',(⎕self ⎕tasks 1),') got message: ',(⍕msg)
⎕←'Forwarding from ',(⍕⎕self), ' to ',⍕⍵
- msg⍈⍵
+ msg send ⍵
}
-last←worker&⍣10⊢⍬
-'Hello there'⍈last
+last←worker&'worker'⍣10⊢⍬
+'Hello there' send last