Threading and Multiprocessing for every project.
Project description
lox
Threading made easy.
Free software: MIT license
Documentation: https://lox.readthedocs.io.
Installation
pip install lox
Features
Multithreading: Powerful, intuitive multithreading in just 2 additional lines of code.
Multiprocessing: Truly parallel function execution with the same interface as multithreading.
Synchronization: Advanced thread synchronization, communication, and resource management tools.
Usage
Easy Multithreading
>>> import lox >>> >>> @lox.thread(4) # Will operate with a maximum of 4 threads ... def foo(x,y): ... return x*y >>> foo(3,4) 12 >>> for i in range(5): ... foo.scatter(i, i+1) -ignore- >>> # foo is currently being executed in 4 threads >>> results = foo.gather() # block until results are ready >>> print(results) # Results are in the same order as scatter() calls [0, 2, 6, 12, 20]
History
0.3.2 (2019-06-17)
Fix manifest for installation from wheel
0.3.1 (2019-06-17)
Fix package on pypi
0.3.0 (2019-06-01)
Multiprocessing decorator. lox.pool renamed to lox.thread
Substantial pytest bug fixes
Documentation examples
timeout for RWLock
0.2.1 (2019-05-25)
Fix IndexSemaphore context manager
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
Built Distribution
File details
Details for the file lox-0.3.2.tar.gz
.
File metadata
- Download URL: lox-0.3.2.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85e651173e20262e12b46c3b382a2b9a0ac0956f2e65dd724847e874296e39bb |
|
MD5 | a2e6b435f7c5c0744955d99de0365ca4 |
|
BLAKE2b-256 | b03ce1a822bf10f85befd4582ccead32ba8a7e0387c916aca7d81ea20bbb7a68 |
File details
Details for the file lox-0.3.2-py2.py3-none-any.whl
.
File metadata
- Download URL: lox-0.3.2-py2.py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfc9b024735f3010ea3b330f7d51868737d1e666b7a05a1631a55600ab563a69 |
|
MD5 | 1ff6d45897ca1c88613a83c9a6896ef5 |
|
BLAKE2b-256 | 02108099ba3e8ff6ecaa6c135981c3c4db65e85a1aa889861f497c0596bd6431 |