[Cgi-session-user] Locking a session
Brought to you by:
sherzodr
From: Bernie C. <be...@re...> - 2009-07-16 15:49:33
|
What I need to do is *lock* a particular session. The problem is arising because some browsers [probably all these days] can/do make multiple parallel HTTP connections as they load a page, and what I'm seeing is that my sessions are getting messed up because two CGIs [probably three, actually, in the case at hand!] are overlapping, and so one process's changes to the session are getting clobbered by another's. It is a standard parallel-access problem, and generally the way you deal with it is to lock the resource so that the second process will wait until the first is done.... My problem is that I can't figure out a way to do that within the context of CGI::Session. I'd like to find some sort of clean way to handle this, although I might have to resort to brute force [using some kind of filesystem lock in /tmp or something like that]. Anyhow, I was wondering: have any others run into this problem of "parallel" CGI access to a session and ways to cope with it? THANKS!! /Bernie\ -- Bernie Cosell RevNet Technologies mailto:be...@re... Roanoke, VA |