[erlang-questions] Spawn funs: code limitations
Sun Aug 31 13:13:09 CEST 2014
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
Sorry if this question is a little bit convoluted... :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions