I think we should emulate the behavior of regular map as much as possible.

JW

On Tue, Feb 8, 2011 at 9:12 PM, Martin Logan <[email protected]> wrote:

> Guys,  pmap needs to pass through exceptions. The implementation will
> be fairly straightforward, anyone against this?
>
> In the do_f function we have the line. I would change this line to
> something like
>
>
>        Parent ! {self(), {error, ErrType, Error}}
>
>
>         Parent ! {self(), {'$exception$', ErrType, Error}}
>
> This would be to sufficiently distinguish an exception from a passed
> back error. Right now we autoconvert exceptions into errors which does
> not look quite correct to me. There may be caveats to passing back the
> exception though and that is what I am asking you to think on. Anyhow,
> If this response above comes back into
>
> wait(Parent, Child, Timeout) ->
>    receive
>        {Child, Ret} ->
>            Parent ! {self(), Ret}
>
> which would then be recognized there and passed back to Parent. When
> Parent receives an exception message it would rethrow it. Anyone
> wishing to collect all responses would need to catch exceptions at an
> application level. Exceptions would serve to short circuit the
> execution of any map functions in this way.
>
> Cheers,
> Martin
>
>
>
> --
> Martin Logan
> Erlang & OTP in Action (Manning) http://manning.com/logan
> http://twitter.com/martinjlogan
> http://erlware.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "erlware-dev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/erlware-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en.

Reply via email to