Globals and multiple requests/sessions #5

Open
cjroebuck opened this Issue Oct 11, 2011 · 1 comment

Comments

Projects
None yet
2 participants

Just wondering how these globals will work when multiple requests come in at the same time. Won't they cause race conditions? Is the global window object created once per session or the very first time anyone hits the server?

Owner

Morriz commented Oct 11, 2011

I have not taken sessions into account, and the window object is global. So yes, this is unstable.
If you really want to set this up for a multi user environment, you could cache a global window object (that is richly setup to your liking), and set that per user request. Or even store that window object per user session (in a registry). I don't know how much memory that would consume, but it would surely make it a helluvalot faster...


On 11Oct, 2011, at 12:38 , cjroebuck wrote:

Just wondering how these globals will work when multiple requests come in at the same time. Won't they cause race conditions? Is the global window object created once per session or the very first time anyone hits the server?

Reply to this email directly or view it on GitHub:
#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment