pulsar
pulsar copied to clipboard
call-timed! doesn't return nil
The documentation at http://docs.paralleluniverse.co/pulsar/ says,
There’s also a timed version of call!, which gives up and returns nil if the timeout expires.
However,
(actors/call-timed! (actors/spawn (actors/gen-server (reify actors/Server
(init [_])
(handle-call [_ _ _ _]
(Strand/sleep 2)
:a)))) 1 :ms :b)
CompilerException java.util.concurrent.TimeoutException
You're right, but the tests assume an exception. Which makes more sense to you and why?