• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H29-Sep-2021-131121

appveyor/H29-Sep-2021-319277

benchmarks/H29-Sep-2021-4028

docs/H29-Sep-2021-2,2961,604

src/H29-Sep-2021-6,5684,449

.clang-formatH A D29-Sep-2021697 3023

.readthedocs.ymlH A D29-Sep-2021439 2016

AUTHORSH A D29-Sep-2021849 5250

CHANGES.rstH A D29-Sep-20219.5 KiB289241

LICENSEH A D29-Sep-20211.4 KiB3123

LICENSE.PSFH A D29-Sep-20212.4 KiB4839

MANIFEST.inH A D29-Sep-2021792 4940

PKG-INFOH A D29-Sep-20214.2 KiB9979

README.rstH A D29-Sep-20212.2 KiB6243

appveyor.ymlH A D29-Sep-20216.1 KiB183152

make-manylinuxH A D29-Sep-20211.5 KiB5332

setup.cfgH A D29-Sep-2021125 96

setup.pyH A D29-Sep-20215.7 KiB161124

tox.iniH A D29-Sep-2021716 3025

README.rst

1.. This file is included into docs/history.rst
2
3.. image:: https://github.com/python-greenlet/greenlet/workflows/tests/badge.svg
4   :target: https://github.com/python-greenlet/greenlet/actions
5
6Greenlets are lightweight coroutines for in-process concurrent
7programming.
8
9The "greenlet" package is a spin-off of `Stackless`_, a version of
10CPython that supports micro-threads called "tasklets". Tasklets run
11pseudo-concurrently (typically in a single or a few OS-level threads)
12and are synchronized with data exchanges on "channels".
13
14A "greenlet", on the other hand, is a still more primitive notion of
15micro-thread with no implicit scheduling; coroutines, in other words.
16This is useful when you want to control exactly when your code runs.
17You can build custom scheduled micro-threads on top of greenlet;
18however, it seems that greenlets are useful on their own as a way to
19make advanced control flow structures. For example, we can recreate
20generators; the difference with Python's own generators is that our
21generators can call nested functions and the nested functions can
22yield values too. (Additionally, you don't need a "yield" keyword. See
23the example in `test_generator.py
24<https://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1>`_).
25
26Greenlets are provided as a C extension module for the regular unmodified
27interpreter.
28
29.. _`Stackless`: http://www.stackless.com
30
31
32Who is using Greenlet?
33======================
34
35There are several libraries that use Greenlet as a more flexible
36alternative to Python's built in coroutine support:
37
38 - `Concurrence`_
39 - `Eventlet`_
40 - `Gevent`_
41
42.. _Concurrence: http://opensource.hyves.org/concurrence/
43.. _Eventlet: http://eventlet.net/
44.. _Gevent: http://www.gevent.org/
45
46Getting Greenlet
47================
48
49The easiest way to get Greenlet is to install it with pip::
50
51  pip install greenlet
52
53
54Source code archives and binary distributions are vailable on the
55python package index at https://pypi.org/project/greenlet
56
57The source code repository is hosted on github:
58https://github.com/python-greenlet/greenlet
59
60Documentation is available on readthedocs.org:
61https://greenlet.readthedocs.io
62