Simple and clean background tasks.
Project description
Unblocked
Unblocked is a simple wrapper around multiprocessing.Process
,
giving users a nicer API as well as task results.
I wrote Unblocked for educational purposes, but it is also suited for actual use. If you are interested in the story behind Unblocked you can read it on my blog
Installation
$ pip install unblocked
Example
In the following snippet, calling example
starts a background process and
returns an unblocked.Result
instance. This result can be retrieved with
unblocked.Result.get
import unblocked
@unblocked.task
def example():
return 5 * 5
if __name__ == "__main__":
result = example()
print(result.get(timeout=1))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unblocked-0.1.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for unblocked-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddee741fcc17530d20f08132054f31a60e2fea58adac186d0a740a4ccf5d1f2d |
|
MD5 | d81a03e306628af28e1d66d996fdc544 |
|
BLAKE2b-256 | 451325ef070d3dcb799a9baa6b8155a07b95a63d49242cdfb9d6c1be8d410da5 |