Remove Possible Race Conditions on Scopes
Zoramite opened this issue · comments
Randy Merrill commented
Need to rework some of the code that occurs during the application and
session startups to eliminate possible race conditions. For example, doing
this:
var settings = {};
settings.title = "My application";
settings.foo = 42;
settings.bar = 60;
settings.baz = false;
application.settings = settings;
Instead of:
application.settings = {};
application.settings.title = "My application";
application.settings.foo = 42;
application.settings.bar = 60;
application.settings.baz = false;
So that the key always exists for the application or scope.
Randy Merrill commented
Reworked the application and session startup to have it use a temporary struct to load
all the variables into before pushing it into the live scope.