[erlang-questions] Dialyzer and rpc:pmap

Stavros Aronis aronisstav@REDACTED
Wed Aug 31 11:10:59 CEST 2011


No, the problem lies in the spec of rpc:yield/1

-spec yield(Key) -> {value, Val} | timeout when
      Key :: key(),
      Val :: (Res :: term()) | {badrpc, Reason :: term()}.

yield(Key) when is_pid(Key) ->
    {value,R} = do_yield(Key, infinity),
    R.

The return value is simply "Val" and not the union "{value, Val} | timeout". 
I guess somebody in the OTP team can fix that.

Dialyzer has a few tricks up its sleeve for handling incoming messages as 
the ones that appear in do_yield, but these are still experimental!

Stavros
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110831/ff76bff2/attachment.htm>


More information about the erlang-questions mailing list