Threading and Multiprocessing for every project.
Project description
lox
Threading made easy.
Free software: MIT license
Documentation: https://lox.readthedocs.io.
Installation
pip install git+https://github.com/BrianPugh/lox#egg=lox
Features
Powerful, intuitive multithreading in just 2 additional lines of code
Advanced thread synchronization, communication, and resource management tools
Examples
Easy Multithreading
>>> import lox >>> @lox.pool(3) # Maximum of 3 concurrent threads >>> def multiply(a,b): >>> return a*b >>> multiply(3,4) # Function works as normal 12 >>> xs = [1,2,3,4,5,] >>> ys = [6,7,7,8,9,] >>> [multiply.scatter(x,y) for x,y in zip(xs,ys)] >>> multiply.gather() [ 6, 14, 21, 32, 45 ]
Contributing
Install the library in editable mode:
pip3 install -e .
All new features must have unit tests.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.2.0 (2019-05-24)
Added QLock
Documentation syntax fixes
0.1.1 (2019-05-24)
CICD test
0.1.0 (2019-05-24)
First release on PyPI.
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
lox-0.2.0.tar.gz
(12.1 kB
view hashes)