On Nov 11, 11:00 pm, Alice Bevan-McGregor <[email protected]> wrote:
> Howdy!
>
> On 2009-11-10, at 3:54 PM, Matt Haggard wrote:
>
> > def GET(self, name):
> > time.sleep(20)
>
> From the official manual
> (http://docs.python.org/library/time.html#time.sleep):
>
> Suspend execution for the given number of seconds.
>
> This suspends your entire application (all threads) for the duration.
The documentation does not say it suspends your entire application.
You might like to go actually test that theory before claiming that
again. You may find it doesn't work quite how you think it does.
Graham
> You can use a threading.Condition
> (http://docs.python.org/library/threading.html#threading.Condition) to sleep
> the current thread, I believe:
>
> import threading
> lock = threading.Condition()
> lock.wait(20.0)
>
> — Alice.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---