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.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distributions

greenlet-0.2-py2.6-win32.egg (9.3 kB view details)

Uploaded Source

greenlet-0.2-py2.5-win32.egg (9.4 kB view details)

Uploaded Source

greenlet-0.2-py2.4-win32.egg (9.3 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for greenlet-0.2.tar.gz
Algorithm Hash digest
SHA256 d1919d283f7e7a2cbb474c620efb703811408026f8c6b25f923acd8b49deebaa
MD5 cfcac72683fbf52d6c9f4f82a319dcb9
BLAKE2b-256 72db0d1a944ba1517256e8b1a080a90297569d8662442631a6b05f8a1c584556

See more details on using hashes here.

File details

Details for the file greenlet-0.2-py2.6-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.2-py2.6-win32.egg
Algorithm Hash digest
SHA256 7eb790f71e10e9810f6f1eebc64586db1c9943b4d79c4ab26597530b2f4bc305
MD5 6a57090c5dc0709bb0d2195bf1d5db85
BLAKE2b-256 497ff1055d407bf218fbafc4c11492318ccb225c509d40ef9d696aec4f079384

See more details on using hashes here.

File details

Details for the file greenlet-0.2-py2.5-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.2-py2.5-win32.egg
Algorithm Hash digest
SHA256 e9734e278ecc74687317742827285578403d136c28a3f7ee194100cfdfcde336
MD5 3e7f356ec5f1f409b33c251cb8111e30
BLAKE2b-256 7f9f6022c1b875a230859d2c7d9e8277c09b57eb1b3b871956eff30b2d4d215d

See more details on using hashes here.

File details

Details for the file greenlet-0.2-py2.4-win32.egg.

File metadata

File hashes

Hashes for greenlet-0.2-py2.4-win32.egg
Algorithm Hash digest
SHA256 268641e52d6a7683d005947c90d121e0bc4e1172fdfea2dbb238e5b08e1774a4
MD5 04ddcb493672e14a02dda1d213c85b83
BLAKE2b-256 92a9d13a5c8a6bb5823835bcdfea02336f4371c7dda6d17ec597146fd1f0ead4

See more details on using hashes here.

Supported by

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