What's the difference between gevent.sleep and time.sleep?
Dave Angel
davea at davea.name
Sun Jul 27 03:22:58 EDT 2014
Xiadong Zhu <mailto1587 at gmail.com> Wrote in message:
> Hi, I'm learning gevent, but I didn't found the difference with gevent.sleep and time.sleep, does anybody could give me a sample code to show their difference? Thanks!
>
gevent is a cooperative analog to the threading module. When using
it you would never use time.sleep. So no example is
needed.
time.sleep would suspend the entire process, blocking all greenlet
threads.
--
DaveA
More information about the Python-list
mailing list