Skip to main content

A Python parallel computing library

Project description

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():
    item_list = [(i, i) for i in range(114514)]
    results = cpu_heater.multiprocess(item_list, adder, max_workers=8, show_progress=True)
    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():
    item_list = [(i, i) for i in range(114514)]
    results = cpu_heater.multithreads(item_list, adder, max_workers=8, show_progress=True)
    assert sorted(results) == sorted([i + i for i in range(114514)])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpu_heater-0.0.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

cpu_heater-0.0.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file cpu_heater-0.0.2.tar.gz.

File metadata

  • Download URL: cpu_heater-0.0.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for cpu_heater-0.0.2.tar.gz
Algorithm Hash digest
SHA256 85db21903436ce40e6362f8d725c24a3538b8b9f2c97d1a5d75be658ddf6d540
MD5 f36a777038b493382ea09e7e7d747673
BLAKE2b-256 4eb223868a1a9a1f48f17d5f8c4c32a24757f78cdf13f8fc2f96fee35bae6ab9

See more details on using hashes here.

File details

Details for the file cpu_heater-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cpu_heater-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.8

File hashes

Hashes for cpu_heater-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81da7076ca000300a4214589163a57409e88edd9bcf8cc7aa9d0d9b768924a6f
MD5 64e7bf9ecb23415a52e5f3ea1e405877
BLAKE2b-256 f4aa6e79ca60762db45c9fa93a163f8e3cbc1c6864c8a0ae3024acc5cbd1af65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page