Skip to main content

Execute Python functions with multithreading.

Project description

Overview

Execute Python functions with multithreading.

Usage

Installation:

pip3 install multithreader
# or
python3 -m pip install multithreader

Example:

# Import multithreader.
from multithreader import threads

# Define arguments.
items = {
    'a': 1,
    'b': 2
}

# Define iterators.
iterators = [1, 2, 3, 4, 5]

# Execute function with multithreading.
results = threads(
    test_function,
    iterators,
    items,
    thread_num=int(sys.argv[1])
)

# Print results.
print(results)

Full Example

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

multithreader-1.0.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

multithreader-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file multithreader-1.0.0.tar.gz.

File metadata

  • Download URL: multithreader-1.0.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for multithreader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b049f47934ebae21272abd93521c5681576685a5c1839776dda89f0e17e8481
MD5 98c03c7bee31a52859475c308a641163
BLAKE2b-256 5b2dfbee32174512463e5283b3c19de523631d9227515d43c18ed1998b5df95a

See more details on using hashes here.

File details

Details for the file multithreader-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: multithreader-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for multithreader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e82c25c31cb7302cee362353e89a7ea2edca0d1b23bb1e9bcd9f0d0a73af235
MD5 2ece37fef3eaa9a169197c801da185d6
BLAKE2b-256 fc28da31ee49bfcffab20f49d93fb3711bc17b5e8c3621fca9446ca86d27473f

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