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 tests/test_generator.py.
Greenlets are provided as a C extension module for the regular unmodified interpreter.
Greenlets are lightweight coroutines for in-process concurrent programming.
Install
pixiaddgreenlet
micromambainstall-c https://repo.prefix.dev/conda-forgegreenlet
Version
Platforms
Last published
Documentation
filename | version | build | Created | size | Architecture | Downloads | |
---|---|---|---|---|---|---|---|
greenlet-3.2.2-py311h89d996e_0.conda | 3.2.2 | py311h89d996e_0 (0) | 3 days ago | 235.03 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py313h5813708_0.conda | 3.2.2 | py313h5813708_0 (0) | 3 days ago | 214.88 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py312h2ec8cdc_0.conda | 3.2.2 | py312h2ec8cdc_0 (0) | 3 days ago | 230.14 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py310h9e98ed7_0.conda | 3.2.2 | py310h9e98ed7_0 (0) | 3 days ago | 192.84 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py313h14b76d3_0.conda | 3.2.2 | py313h14b76d3_0 (0) | 3 days ago | 225.29 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py39hb33b4f4_0.conda | 3.2.2 | py39hb33b4f4_0 (0) | 3 days ago | 209.51 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py310h6954a95_0.conda | 3.2.2 | py310h6954a95_0 (0) | 3 days ago | 201.62 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py313h46c70d0_0.conda | 3.2.2 | py313h46c70d0_0 (0) | 3 days ago | 230.81 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py39hf88036b_0.conda | 3.2.2 | py39hf88036b_0 (0) | 3 days ago | 206.55 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py310hf71b8c6_0.conda | 3.2.2 | py310hf71b8c6_0 (0) | 3 days ago | 208.42 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py39h941272d_0.conda | 3.2.2 | py39h941272d_0 (0) | 3 days ago | 201.76 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py310he30c3ed_0.conda | 3.2.2 | py310he30c3ed_0 (0) | 3 days ago | 210.54 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py312h6f74592_0.conda | 3.2.2 | py312h6f74592_0 (0) | 3 days ago | 232.07 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py312hd8f9ff3_0.conda | 3.2.2 | py312hd8f9ff3_0 (0) | 3 days ago | 225.51 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py311hc356e98_0.conda | 3.2.2 | py311hc356e98_0 (0) | 3 days ago | 227.68 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py39ha51f57c_0.conda | 3.2.2 | py39ha51f57c_0 (0) | 3 days ago | 191.36 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py312haafddd8_0.conda | 3.2.2 | py312haafddd8_0 (0) | 3 days ago | 224.16 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py39hdf37715_0.conda | 3.2.2 | py39hdf37715_0 (0) | 3 days ago | 200.5 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py311hfdbb021_0.conda | 3.2.2 | py311hfdbb021_0 (0) | 3 days ago | 232.85 KB | N/A | ||
Dependencies: | |||||||
greenlet-3.2.2-py313h3c9ed74_0.conda | 3.2.2 | py313h3c9ed74_0 (0) | 3 days ago | 233.73 KB | N/A | ||
Dependencies: |