@@ -49,7 +49,7 @@ depend on the other tasks and thus can be run
49
49
* synchronously* . A switch between the two
50
50
executions is known as a * context switch* .
51
51
52
- A context switch in gevent done through
52
+ A context switch in gevent is done through
53
53
* yielding* . In this case example we have
54
54
two contexts which yield to each other through invoking
55
55
`` gevent.sleep(0) `` .
@@ -317,6 +317,7 @@ In addition to using the base Greenlet class, you may also subclass
317
317
Greenlet class and overload the `` _run `` method.
318
318
319
319
[[[ cog
320
+ import gevent
320
321
from gevent import Greenlet
321
322
322
323
class MyGreenlet(Greenlet):
@@ -685,11 +686,13 @@ one very simply using a Queue inside of a subclassed Greenlet.
685
686
686
687
<pre >
687
688
<code class =" python " >import gevent
689
+ from gevent.queue import Queue
690
+
688
691
689
692
class Actor(gevent.Greenlet):
690
693
691
694
def __init__(self):
692
- self.inbox = queue. Queue()
695
+ self.inbox = Queue()
693
696
Greenlet.__init__(self)
694
697
695
698
def receive(self, message):
@@ -826,7 +829,7 @@ instead of libev. Libevent included a fast HTTP server which was
826
829
used by gevent's `` wsgi `` server.
827
830
828
831
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
830
833
`` gevent.pywsgi `` .
831
834
832
835
0 commit comments