[mod_python] For what session locking is? Do i need it whileusing MySQL?

Graham Dumpleton grahamd at dscpl.com.au
Fri Aug 11 02:32:07 EDT 2006

Norman Tindall wrote ..
>   I think it SHOULD be added to documentation that after all
>   manipulation with session data is made you MUST unlock it
>   explicit.
>   For example in my handler i can unlock even before headers is sent
>   to client - and it is much more faster than 100 sec.

You do not have to unlock the session if you don't want to, so adding
that 'you MUST unlock' the session to the documentation would be
plain wrong. This doesn't mean though that you can't unlock the
session earlier if you want to in situations like your own.

What you really want is to say something to the effect that the session
by default will only be unlocked once all data has been flushed and
able to be sent to the client, but if you want to unlock it earlier you can
so long as you don't access the session object after that point.


More information about the Mod_python mailing list