Re: [mod_python] s ession lock

Jim Gallacher jpg at jgassociates.ca
Fri Apr 28 09:04:02 EDT 2006


yjfuk wrote:
> in the mod_python's Session module ,I analyse the code.
> when it use sid ,it invoke lock method .why does it lock sid?
> when it unlock sid? end of the request it auto unlock?

The session is locked so that the session data is lost or corrupted by 2 
  requests with the same sid arriving almost simultaneously, as might 
happed with page frames, or if the user has multiple browser windows or 
tabs open to the same website.

When the session is locked a cleanup is registered to unlock the session 
when the request is complete.

Jim



More information about the Mod_python mailing list