diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/demo.apl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/demo.apl b/tests/demo.apl index 7a6ddca..99ef783 100644 --- a/tests/demo.apl +++ b/tests/demo.apl @@ -8,6 +8,7 @@ iotaServer←{ msg←1⍨⍇0 msg≡'stop': ⎕←'Bye bye from indexer' (from num)←msg + num<0: ∇⍵⊣ ('some slow result'⊣⎕DL 2)⍈from _←(⍳num)⍈from ∇⍵ } @@ -23,9 +24,19 @@ stop←{ 'stop'⍈id } +flush←{ + ⍺←0 + 12::⍺ + msg←1⍨⍇0 + (⍺+1)∇⍵ +} + iota←{ - ⍝ Sending messages to a nonexisting thread throws a domain error (11) + ⍺←⍬ ⍝ No timeout by default 11::'Sorry, the iota server is not running' + 12::'Sorry, the iota server was too slow to respond' + ⍝ Sending messages to a nonexisting thread throws a domain error (11) + ⍝ And if a timeout happens, an error 12 will happen. _←(⎕self ⍵)⍈id - 1⍨⍇0 + 1⍨⍇⍺ } |