The package provides extended control over threads
Project description
Better Threads
Ever wanted to pause, stop, resume or pipe data between threads? Well this module does exactly that.
Key features
- Pass data between threads
- Pause, Resume and Stop threads
- Simple
Installing
Python 3.7 or higher is required
pip install better-threads
Quick example
More exmples https://github.com/ItsYasiru/Better-Threads/tree/master/examples
import time
from BetterThreads import ThreadPool
thread_pool = ThreadPool()
@thread_pool.thread()
def test_loop(data):
print("Loop running!")
time.sleep(1)
thread_pool.start(test_loop)
time.sleep(5)
thread_pool.pause(test_loop)
time.sleep(5)
thread_pool.resume(test_loop)
time.sleep(5)
thread_pool.stop(test_loop)
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
better-threads-0.2.3.tar.gz
(2.8 kB
view hashes)
Built Distributions
Close
Hashes for better_threads-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cce7e74fc260f9a5fbb43995ac8c488ba1c0d178e3a2f3465874572063359db |
|
MD5 | f124790e6b49b46fb3ff01bac0d7026f |
|
BLAKE2b-256 | 616aaaec76ecc0fbb67c100c7bc22032932a605f3660607fea8c663cc43b8cd9 |