3 ms·
i wonder how you would make the update to `b` work in this case? If you have a white listed set of pure operations (like the `+` operation), then you can check
by chii 5y ago
i wonder how you would make the update to `b` work in this case?
If you have a white listed set of pure operations (like the `+` operation), then you can check if the hot-reloaded code has any dependencies which could be re-executed (like the b=a+2 case). You wouldn't want to re-execute code that has a side-effect upon hot reloading imho.
- kwazar90 5y agoReloadium executes a module in a sandbox environment until it reaches the modules top most frame location (to prevent getting into a loop or other entrypoint and being stuck) and looks for changes. For code that should be executed only once you have to add # reloadium: no_reload (blocks of code can be ignored as well, more details here https://reloadium.io/documentation/decorators https://reloadium.io/documentation/decorators)