Useful threading for pause/unpause and terminating
Project description
Threading for human.
Features
Some of main features:
- Support pause/unpause
- Support termination thread non-preemtively
Installation
You can install xthread from PyPi
$ pip install xthread
Usage
import time
from xthread import Thread
def target(executor):
print("Running...")
time.sleep(1)
thread = Thread(target)
# Running...
# Running...
thread.pause()
thread.unpause()
# Running...
# Running...
thread.stop()
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
xthread-0.0.2.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file xthread-0.0.2.tar.gz
.
File metadata
- Download URL: xthread-0.0.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 316a9c0d70a193532432f40d4c7d95045af2a4ac49b0de8bc081c7eb8c637f26 |
|
MD5 | 8225b926c1c9ced86e8211acc4dd6bcf |
|
BLAKE2b-256 | 193023c699dc85200972f8aa0c65c2f19307257f66ae2aea700c426a18c79476 |
File details
Details for the file xthread-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: xthread-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77a28765f42f9f108757dff3e3308d88360290daf3d5d64184b020edb2b9b2c |
|
MD5 | 716e6e1231158f77a09ce102d3d10af8 |
|
BLAKE2b-256 | 90b7c32f553812e59a3c505c9c9016596bdf80e64efb291f1815805d146e34c1 |