Encapsulate tasks safely using processes.
Project description
task_process_wrap
Encapsulate tasks safely using processes
install
pip install task_process_wrap
usage
from task_process_wrap import TaskProcessWrap
import time
tpw = TaskProcessWrap(["python", "-c", "import time; [(print(i, flush=True), time.sleep(1)) for i in range(100)]"])
tpw.start()
while True:
print(tpw.info())
time.sleep(0.5)
if tpw.info()["status"] in ["done", "killed"]:
break
if tpw.info()["run_time"] > 10:
tpw.kill()
print(tpw.info())
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file task_process_wrap-0.1.0.tar.gz.
File metadata
- Download URL: task_process_wrap-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5632a6fdf856c46b14f515e43e61edcea77bccc69435176750c28aa51f315f5
|
|
| MD5 |
ca0d919557e85aad551900c83d5523c5
|
|
| BLAKE2b-256 |
f425edce17c26ee4f2ee9a989bdc7a703485d5efeff7f58398e8b7a7d31027d2
|
File details
Details for the file task_process_wrap-0.1.0-py3-none-any.whl.
File metadata
- Download URL: task_process_wrap-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a68ab6c84d5809edd0ba47228226698b226619f84f5250e6bb6bd971f66f47fa
|
|
| MD5 |
81e081ea7bf2c32446446c43119baa6f
|
|
| BLAKE2b-256 |
2f944d5855dae1f9fb989fb40a91663410173a6775a8ad1794e259bdbc4b0225
|