On Thu, Sep 18, 2008 at 7:11 AM, Stuart Sierra <[EMAIL PROTECTED]>wrote:
> > On a related note, would it be possible to implement atomic, system- > wide transactions by suspending the current computation, replacing > some root bindings, and continuing? How do long-running systems like > Erlang handle this problem? > > -Stuart > Erlang handles code replacement at the module level. Being process-based (referring to Erlang processes, not OS processes), Erlang can essentially give each process a persistent reference to each module it includes. The VM keeps up to 2 versions of hte code alive. When a module is replaced, new processes see the new module. Existing processes keep using the old module until they make a fully qualified function call, at which point they get the new module. If you replace the code again, processes running the old-old code die. (I'm rehashing the contents of http://erlang.org/doc/reference_manual/code_loading.html#12.2) --Shawn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---