Skip to content

Commit 063b823

Browse files
committed
Merge remote-tracking branch 'origin/master' into restyle
2 parents c2e19c4 + a9da1f3 commit 063b823

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ <h2 id="synchronous-asynchronous-execution">Synchronous &amp; Asynchronous Execu
261261
Task 5 done
262262
</pre></code></p>
263263
<p>In the synchronous case all the tasks are run sequentially,
264-
which results in the main programming <em>blocking</em> (
264+
which results in the main program <em>blocking</em> (
265265
i.e. pausing the execution of the main program )
266266
while each task executes.</p>
267267
<p>The important parts of the program are the
@@ -319,7 +319,7 @@ <h2 id="synchronous-asynchronous-execution">Synchronous &amp; Asynchronous Execu
319319
<h2 id="determinism">Determinism</h2>
320320
<p>As mentioned previously, greenlets are deterministic. Given the same
321321
configuration of greenlets and the same set of inputs and they always
322-
produce the same output. For example lets spread a task across a
322+
produce the same output. For example let's spread a task across a
323323
multiprocessing pool compared to a gevent pool.</p>
324324
<pre>
325325
<code class="python">
@@ -644,7 +644,7 @@ <h2 id="events">Events</h2>
644644
</code>
645645
</pre>
646646

647-
<p>A extension of the Event object is the AsyncResult which
647+
<p>An extension of the Event object is the AsyncResult which
648648
allows you to send a value along with the wakeup call. This is
649649
sometimes called a future or a deferred, since it holds a
650650
reference to a future value that can be set on an arbitrary time
@@ -745,7 +745,7 @@ <h2 id="queues">Queues</h2>
745745
counterpart, <code>put_nowait</code> and
746746
<code>get_nowait</code> which will not block, but instead raise
747747
either <code>gevent.queue.Empty</code> or
748-
<code>gevent.queue.Full</code> in the operation is not possible.</p>
748+
<code>gevent.queue.Full</code> if the operation is not possible.</p>
749749
<p>In this example we have the boss running simultaneously to the
750750
workers and have a restriction on the Queue that it can contain no
751751
more than three elements. This restriction means that the <code>put</code>
@@ -821,7 +821,7 @@ <h2 id="queues">Queues</h2>
821821
</pre></code></p>
822822
<h2 id="groups-and-pools">Groups and Pools</h2>
823823
<p>A group is a collection of running greenlets which are managed
824-
and scheduled together as group. It also doubles as parallel
824+
and scheduled together as group. It also doubles as a parallel
825825
dispatcher that mirrors the Python <code>multiprocessing</code> library.</p>
826826
<pre><code class="python">
827827
import gevent
@@ -856,9 +856,9 @@ <h2 id="groups-and-pools">Groups and Pools</h2>
856856
fizz
857857
fizz
858858
</pre></code></p>
859-
<p>This is very usefull for managing groups of asynchronous tasks
860-
that.</p>
861-
<p>As mentioned above Group also provides an API for dispatching
859+
<p>This is very useful for managing groups of asynchronous tasks
860+
that run in parallel.</p>
861+
<p>As mentioned above, Group also provides an API for dispatching
862862
jobs to grouped greenlets and collecting their results in various
863863
ways.</p>
864864
<pre><code class="python">
@@ -963,8 +963,8 @@ <h2 id="groups-and-pools">Groups and Pools</h2>
963963
<h2 id="locks-and-semaphores">Locks and Semaphores</h2>
964964
<p>A semaphore is a low level synchronization primitive that allows
965965
greenlets to coordinate and limit concurrent access or execution. A
966-
semaphore exposes two methods, <code>acquire</code> and <code>release</code> The
967-
difference between the number of times and a semaphore has been
966+
semaphore exposes two methods, <code>acquire</code> and <code>release</code>.
967+
The difference between the number of times and a semaphore has been
968968
acquired and released is called the bound of the semaphore. If a
969969
semaphore bound reaches 0 it will block until another greenlet
970970
releases its acquisition.</p>
@@ -1006,7 +1006,7 @@ <h2 id="locks-and-semaphores">Locks and Semaphores</h2>
10061006
Worker 5 acquired semaphore
10071007
Worker 5 released semaphore
10081008
</pre></code></p>
1009-
<p>A semaphore with bound of 1 is known as a Lock. it provides
1009+
<p>A semaphore with bound of 1 is known as a Lock. It provides
10101010
exclusive execution to one greenlet. They are often used to
10111011
ensure that resources are only in use at one time in the context
10121012
of a program.</p>
@@ -1083,7 +1083,7 @@ <h2 id="gevent-zeromq">Gevent ZeroMQ</h2>
10831083
distributed applications. </p>
10841084
<p>ZeroMQ provides a variety of socket primitives, the simplest of
10851085
which being a Request-Response socket pair. A socket has two
1086-
methods of interest <code>send</code> and <code>recv</code>, both of which are
1086+
methods of interest: <code>send</code> and <code>recv</code>, both of which are
10871087
normally blocking operations. But this is remedied by a briliant
10881088
library by <a href="https://github.com/traviscline">Travis Cline</a> which
10891089
uses gevent.socket to poll ZeroMQ sockets in a non-blocking
@@ -1451,4 +1451,4 @@ <h2 id="chat-server">Chat Server</h2>
14511451
</div>
14521452

14531453
</body>
1454-
</html>
1454+
</html>

tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ modify this value. This results in resources whose values become
282282
time-dependent on the execution order. This is a problem, and in
283283
general one should very much try to avoid race conditions since
284284
they result program behavior which is globally
285-
non-deterministic.*
285+
non-deterministic.
286286

287287
The best approach to this is to simply avoid all global state all
288288
times. Global state and import-time side effects will always come
@@ -324,7 +324,7 @@ gevent.joinall(threads)
324324
[[[end]]]
325325

326326
In addition to using the base Greenlet class, you may also subclass
327-
Greenlet class and overload the ``_run`` method.
327+
Greenlet class and override the ``_run`` method.
328328

329329
[[[cog
330330
import gevent
@@ -457,7 +457,7 @@ except Timeout:
457457
</code>
458458
</pre>
459459

460-
Or with a context manager in a ``with`` a statement.
460+
Or with a context manager in a ``with`` statement.
461461

462462
<pre>
463463
<code class="python">import gevent

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