On Wednesday, March 23, 2011 7:15:59 AM UTC-4, olivier wrote:
>
> Thanks for the clarification on session behavior.
> I tried to unlock the session (or to forget it) in the controller but
> it seems requests from the same user are still handled sequentially.
> Is it possible to have the same user request two pages at the same
> time or am I missing something?
As per Jonathan's recent reply, you have to unlock the session within
the same request that locks it. For example, let's say you have:
def function1():
# some code that takes a while to run...
return dict()
def function2():
# do stuff...
return dict()
If a request comes in for function1 first, it will lock the session file,
and a subsequent request for function2 will have to wait. If you don't want
function2 to wait for function1, then you have to unlock the session at the
beginning of function1 (or in the controller, outside both functions, or in
a model file). Is that what you're doing? Can you show some code?
Anthony