https://github.com/koehlma/lightasync
LightAsync aims to be a fast, lightweight, cross platform and multi GUI toolkit library for asynchronous IO written in Python using Enhanced Generators as described in PEP 342.
https://github.com/koehlma/lightasync
Last synced: about 2 months ago
JSON representation
LightAsync aims to be a fast, lightweight, cross platform and multi GUI toolkit library for asynchronous IO written in Python using Enhanced Generators as described in PEP 342.
- Host: GitHub
- URL: https://github.com/koehlma/lightasync
- Owner: koehlma
- License: lgpl-2.1
- Created: 2012-12-26T10:14:26.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-27T21:49:24.000Z (over 12 years ago)
- Last Synced: 2025-02-14T05:44:01.616Z (4 months ago)
- Language: Python
- Homepage:
- Size: 148 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LightAsync
LightAsync aims to be a **fast**, **lightweight**, **cross platform** and
**multiple GUI toolkit** library for asynchronous IO written in Python using
Enhanced Generators as described in
[PEP 342](http://www.python.org/dev/peps/pep-0342/).## Working
* Platforms:
* GLib
* Epoll
* Enhanced Generators (PEP 342) - quick and dirty## ToDo:
* Python 2 Support
* Something like Tornado's stream class
* Cleanup
* Platforms:
* Py(Side|QT)?
* ...
# Enhanced Generator (PEP 342)
def asynchronous():
...
return Asynchronous()
def function_2():
return Event | Condition | Timeout | Asynchronous | Callback | ...
@asynchronous
def function_1():
result = yield function_2(*arguments, **key_word_argument)
| - Event: Wait until event occurs and then continue
| execution. Result will be the arguments passed to
| the event handler.
| - Condition: Wait until the condition becomes active and
| continue execution after that. Result will be
| `None`.
| - Timeout: Wait until timeouts time delta is over and then
| continue execution. Result will be `None`
| - Asynchronous: Wait until an other asynchronous function
| has finished and pass its result to result.
| - Callback: Wait until callback is called and pass the
| arguments to result.
| - ...: Every other Python object will be stored in the
| asynchronous object's progress variable and could
| be used to dispatch the progress of a certain task.