[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How Lua code can be updated at runtime without breaking global state?
- From: Nikolay Zapolnov <zapolnov@...>
- Date: Tue, 26 Mar 2013 07:55:10 +0400
I periodically find Lua-based projects that do "dynamic update" (one of them - Celedev - was announced on this list less than a day ago with a great video :)). These projects update code in runtime while application is still running.
I am wondering, what techniques are used to dynamically update Lua code without breaking normal execution of a program?
There are a lot of caveats, for example what if program stores some non-constant data in global variables that are initialized in the beginning of the script? Simply reloading the script will reset that global variables to initial values...