On Jan 18, 2011, at 7:58 PM, Massimo Di Pierro wrote:
>
> Your code does not block the server. Only blocks the session
> associated to your browser to guarantee integrity of the data in your
> session. If you know that the block function takes time and it does
> not need to save session, you can do:
>
> def blockme():
> session.forget()
> import time
> time.sleep(30)
>
> def sayjunk():
> return "<html><head><title>Junk</title></head><body>junk</body></
> html>"
Actually, there's a bug in the documentation (or else in Session). You have to
say:
session.forget(response)
or else the session doesn't get unlocked.