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.1.tar.gz
(6.3 kB
view details)
Built Distribution
File details
Details for the file xthread-0.0.1.tar.gz
.
File metadata
- Download URL: xthread-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb96bffcc58173c136c92d96a59e75f1a386656ac40c594cae41a61553344b55 |
|
MD5 | d3e0a20509e2c67df6d70b176756cbff |
|
BLAKE2b-256 | e9de620453f5abbc304611b3fa541608891e55be26674aaa44645ac1c139fe8d |
File details
Details for the file xthread-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: xthread-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 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 | 4cd9b3445d1cea5d4241921a14330b01ff86bcb6dd0160472adb95ac055c69d8 |
|
MD5 | f3b2c9f67af2e82af320d20880c3b622 |
|
BLAKE2b-256 | 786105d06911872b2d4e3a2d86f7f83ca7f5801851d152389c3d8b5c2f23cfff |