Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75266

Re:What's the difference between gevent.sleep and time.sleep?

From Dave Angel <davea@davea.name>
Subject Re:What's the difference between gevent.sleep and time.sleep?
Date 2014-07-27 03:22 -0400
Organization news.gmane.org
References <06f8b528-92e9-4979-80dd-43e0267dcf7b@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.12356.1406445778.18130.python-list@python.org> (permalink)

Show all headers | View raw


Xiadong Zhu <mailto1587@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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

What's the difference between gevent.sleep and time.sleep? Xiadong Zhu <mailto1587@gmail.com> - 2014-07-26 18:38 -0700
  Re:What's the difference between gevent.sleep and time.sleep? Dave Angel <davea@davea.name> - 2014-07-27 03:22 -0400

csiph-web