GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit e01b660a authored by Nathan Graule's avatar Nathan Graule 💻
Browse files

Merge branch 'develop' of into develop

parents 594ab62e 7aabf24d
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](
and this project adheres to [Semantic Versioning](
## [Unreleased]
### Added
- Asynchronous process of callback functions
- Ability to chain calls
- Ability to catch in chains
- Ability to block until resolve/reject
- Ability to join the underlying threads
\ No newline at end of file
# Call
Thread-based, JS-like asynchronous calls for Python. Works in both Python 2.7 and Python 3.5+.
## Install
You will be soon able to install through pypi.
git clone
cd call
# Activate virtualenv if needed
python install
The library requires no other dependencies, and (will soon) support Python's `await` keyword.
## Use
Create a call:
def cb(resolve, reject):
result = factorial(100)
call = Call(cb)
Chain calls with the `then` keyword
call = Call(cb).then(lambda val: print(val))
Catch errors:
call = Call(cb)\
.then(lambda val: raise Exception())\
.catch(lambda err: print('Whoops'))
Compose calls:
results = Call.all([Call(cb) for _ in range(10)])
Block thread until resolved (or raises on failure):
result = call.wait()
Wait for call to either resolve or reject
result = # Not recommended
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment