[erlang-questions] Spawn funs: code limitations

Roberto Aloi prof3ta@REDACTED
Sun Aug 31 13:17:20 CEST 2014


This should help:

http://www.javalimit.com/2010/05/passing-funs-to-other-erlang-nodes.html
On 31 Aug 2014 13:13, "Alessandro Sivieri" <alessandro.sivieri@REDACTED>
wrote:

> Hi all,
>
> quick question, which has probably been already answered many times, but I
> cannot find an answer myself.
>
> Suppose that I have an application with a module that has a function that
> does some stuff and performs a remote spawn of a fun: I did it some time
> ago and I seem to remember that there are limitations in the code that the
> fun is composed of, something on the lines of: if the code is complex I
> need to send the bytecode of the module, too, and load it remotely. If the
> fun simply contains invocations of other functions (that are already
> present in the remote node), then everything goes well. Am I right?
>
> To sum up: when I spawn a fun remotely, what kind of data is sent to the
> remote node? A pointer to the module where the fun code is contained plus
> its closure (i.e., the value of the variables)? This is what I seem to
> remember.
>
> Sorry if this question is a little bit convoluted... :)
>
> --
> Sivieri Alessandro
> alessandro.sivieri@REDACTED
> http://sivieri.wordpress.com/
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140831/65436d8a/attachment.htm>


More information about the erlang-questions mailing list