pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

call-timed! doesn't return nil

Open luminusian opened this issue 8 years ago • 1 comments

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

luminusian avatar Jan 27 '17 09:01 luminusian

You're right, but the tests assume an exception. Which makes more sense to you and why?

pron avatar Feb 28 '17 15:02 pron