Skip to main content

Lightweight in-process concurrent programming

Project description

(This is the py.magic.greenlet module from the py lib <http://codespeak.net/py/>)

The “greenlet” package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”. Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on “channels”.

A “greenlet”, on the other hand, is a still more primitive notion of micro-thread with no implicit scheduling; coroutines, in other words. This is useful when you want to control exactly when your code runs. You can build custom scheduled micro-threads on top of greenlet; however, it seems that greenlets are useful on their own as a way to make advanced control flow structures. For example, we can recreate generators; the difference with Python’s own generators is that our generators can call nested functions and the nested functions can yield values too. Additionally, you don’t need a “yield” keyword. See the example in test_generator.py.

Greenlets are provided as a C extension module for the regular unmodified interpreter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenlet-0.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distributions

greenlet-0.1-py2.4-macosx-10.4-ppc.egg (15.0 kB view details)

Uploaded Egg

greenlet-0.1-py2.4-macosx-10.3-fat.egg (26.3 kB view details)

Uploaded Egg

greenlet-0.1-py2.3-macosx-10.4-ppc.egg (15.0 kB view details)

Uploaded Egg

File details

Details for the file greenlet-0.1.tar.gz.

File metadata

  • Download URL: greenlet-0.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for greenlet-0.1.tar.gz
Algorithm Hash digest
SHA256 5d71dd7e5acb64333c387fbf215f0019ffcdaeab46bb4d30f9ff6ccc94e41710
MD5 b9536375126dd373abdd4a43cb70136f
BLAKE2b-256 8e6d59d9a80285c4fef1254d4f589dda87d593e7316082ff94ad2f277eafca22

See more details on using hashes here.

File details

Details for the file greenlet-0.1-py2.4-macosx-10.4-ppc.egg.

File metadata

File hashes

Hashes for greenlet-0.1-py2.4-macosx-10.4-ppc.egg
Algorithm Hash digest
SHA256 f33dc4256af5bcb7edf7122e0862b25d7fa2786b6411c6900ea272c58b5eed27
MD5 c776433fb9976e86a1d3b386609646a0
BLAKE2b-256 854647ed52b335d0946957eb966653207e8ea56a53d2f15c2977936f21a629cc

See more details on using hashes here.

File details

Details for the file greenlet-0.1-py2.4-macosx-10.3-fat.egg.

File metadata

File hashes

Hashes for greenlet-0.1-py2.4-macosx-10.3-fat.egg
Algorithm Hash digest
SHA256 17b8730ef03b5a71eff77e1396387af026880062457c37f40e4640fc588f6064
MD5 563dc89ac12e269fbe9ce08c7fb859fc
BLAKE2b-256 eaf2fc6baeec417468b905230e8b2c76fcadbb644bcb67aaf9137d559148c208

See more details on using hashes here.

File details

Details for the file greenlet-0.1-py2.3-macosx-10.4-ppc.egg.

File metadata

File hashes

Hashes for greenlet-0.1-py2.3-macosx-10.4-ppc.egg
Algorithm Hash digest
SHA256 713d27a22cf3338e3ed55ff10f42cf87db3fe81f5eb9dc9c5a9d15680b269875
MD5 ef3610b55a88e31eb92954671a26ec51
BLAKE2b-256 6937d7c0a2fc97f345c5237953827bf06dc0e885bd606ce9ad536803962d23bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page