[erlang-questions] Spawn funs: code limitations

Alessandro Sivieri alessandro.sivieri@REDACTED
Sun Aug 31 13:13:09 CEST 2014


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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140831/2f7b7282/attachment.htm>


More information about the erlang-questions mailing list