Skip to content

Commit 8c74bed

Browse files
author
Stephen Diehl
committed
Merge pull request sdiehl#15 from djv/master
Fix typos and imports
2 parents a2dcf71 + c9a915f commit 8c74bed

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tutorial.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ depend on the other tasks and thus can be run
4949
*synchronously*. A switch between the two
5050
executions is known as a *context switch*.
5151

52-
A context switch in gevent done through
52+
A context switch in gevent is done through
5353
*yielding*. In this case example we have
5454
two contexts which yield to each other through invoking
5555
``gevent.sleep(0)``.
@@ -317,6 +317,7 @@ In addition to using the base Greenlet class, you may also subclass
317317
Greenlet class and overload the ``_run`` method.
318318

319319
[[[cog
320+
import gevent
320321
from gevent import Greenlet
321322

322323
class MyGreenlet(Greenlet):
@@ -685,11 +686,13 @@ one very simply using a Queue inside of a subclassed Greenlet.
685686

686687
<pre>
687688
<code class="python">import gevent
689+
from gevent.queue import Queue
690+
688691

689692
class Actor(gevent.Greenlet):
690693

691694
def __init__(self):
692-
self.inbox = queue.Queue()
695+
self.inbox = Queue()
693696
Greenlet.__init__(self)
694697

695698
def receive(self, message):
@@ -826,7 +829,7 @@ instead of libev. Libevent included a fast HTTP server which was
826829
used by gevent's ``wsgi`` server.
827830

828831
In gevent 1.0.x there is no http server included. Instead
829-
``gevent.wsgi`` it is now an alias for the pure Python server in
832+
``gevent.wsgi`` is now an alias for the pure Python server in
830833
``gevent.pywsgi``.
831834

832835

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy