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?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'wrote': 0.14; 'blocking': 0.16; 'received:80.91.229.3': 0.16; 'received:97': 0.16; 'received:plane.gmane.org': 0.16; 'subject:between': 0.16; 'suspend': 0.16; 'threads.': 0.16; 'example': 0.22; 'header:X -Complaints-To:1': 0.27; 'needed.': 0.30; "i'm": 0.30; 'code': 0.31; 'thanks!': 0.32; 'subject:the': 0.34; 'could': 0.34; 'anybody': 0.35; 'but': 0.35; 'module.': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'hi,': 0.36; 'process,': 0.38; 'to:addr:python- list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'entire': 0.61; 'show': 0.63; 'sample': 0.67; 'analog': 0.84; 'subject::': 0.85
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re:What's the difference between gevent.sleep and time.sleep?
Date Sun, 27 Jul 2014 03:22:58 -0400 (EDT)
Organization news.gmane.org
References <06f8b528-92e9-4979-80dd-43e0267dcf7b@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 97.73.240.28
X-Newsreader PiaoHong.Usenet.Client.VIP:1.56
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12356.1406445778.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406445778 news.xs4all.nl 2833 [2001:888:2000:d::a6]:35671
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75266

Show key headers only | 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