CPU-Heater
A Python parallel computing library.
Install
pip install cpu-heater
Usage
Multiprocessing:
import cpu_heater
def adder(x, y):
return x + y
def test_cpu_heater():
args_list = [(i, i) for i in range(114514)]
results = cpu_heater.multiprocess(
adder,
args_list,
max_workers=8,
show_progress=True,
timeout=10,
desc="test",
not_none=True,
extend_mode=False,
)
assert sorted(results) == sorted([i + i for i in range(114514)])
Multithreading:
import cpu_heater
def adder(x, y):
return x + y
def test_cpu_heater():
args_list = [(i, i) for i in range(114514)]
results = cpu_heater.multithreads(
adder,
args_list,
max_workers=8,
show_progress=True,
desc="test",
not_none=True,
extend_mode=False,
)
assert sorted(results) == sorted([i + i for i in range(114514)])
Metadata
Release files for cpu-heater 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cpu_heater-0.2.1.tar.gz | 14.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpu_heater-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / cpu_heater-0.2.1.tar.gz
| Download URL | cpu_heater-0.2.1.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dc4ff909e946e04272a825d9488deb1c07c1b88bac9982e615513575f8b0033
|
|
BLAKE2b-256 checksum How to use checksums |
7395fe40c54d274b04d016bf486b9f2a806529342f26e60cd9307cf3b294a1d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency logRelease files / cpu_heater-0.2.1-py3-none-any.whl
| Download URL | cpu_heater-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c7195e2d72c2a7ed45195808b288a7c33b6d776663961830451a3775768e21f
|
|
BLAKE2b-256 checksum How to use checksums |
519571265d594298d0d49e296c83a3285a9368eb8fab2fa8f50eaa76ea898ac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 18, 2025.
Transparency log