[erlang-questions] Loading code generated on the fly

Thomas Lindgren thomasl_erlang@REDACTED
Sun Sep 28 01:07:26 CEST 2008




--- On Sat, 9/27/08, Attila Babo <babo.online@REDACTED> wrote:

> From: Attila Babo <babo.online@REDACTED>
> We experienced in a long running production environment that
> generated
> code are sometimes unloaded, our current workaround is to
> check its
> presence and reload it from a database if needed. Is there
> a way to
> force to keep it in cache? A possibility to create a dummy
> process to
> keep a single reference to the module all way long. Is
> there a better
> way?

The only way I know of to unload code on the sly is to replace it with a new module of the same name (twice). You wouldn't happen to reuse module names somewhere in your code generator?

Best,
Thomas



      



More information about the erlang-questions mailing list