[newbie] spawn-ed functions always exported?
Wed Jan 26 16:05:16 CET 2005
On Wed, Jan 26, 2005 at 06:36:10PM +0400, Gaspar Chilingarov wrote:
> Hello all!
> Are there any way not to export functions which are logically internal
> to the module, but appear in spawn command ?
This seems simple enough for me to answer, so I will try :-)
spawn(?MODULE, f, [A1, A2, A3])
you can use
spawn(fun ()->f(A1, A2, A3) end)
Note however that these two will have slightly differing behaviour in
the presence of hot code update. Afaik the first one will spawn the
function of the newest version of the module, while the second one
will spawn the function of the version of the module executing the
Carsten Schultz (2:38, 33:47)
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the erlang-questions