Skip to main content

Multi Threading

Example Class

import multithreading

class Demo(multithreading.MultiThread):
    def task(self, task):
        print(task)

Example Main

task_list = range(1, 3 + 1)

demo = Demo(task_list, threads=3)

# Start
demo.start()

Result

1
2
3

OR

demo = Demo(threads=3)

# Start threads
demo.start_threads()

# Adding task to queue
demo.add_task(1)
demo.add_task(2)
demo.add_task(3)

# Wait until queue is empty
demo.join()

Result

1
2
3

Install

$ pip install multithreading

Metadata

Release files for multithreading 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multithreading 0.2.0
File Size Uploaded Provenance Actions
multithreading-0.2.0.tar.gz 4.8 kB Without provenance Details for multithreading-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for multithreading 0.2.0
File Interpreter ABI Platform Actions
multithreading-0.2.0-py3-none-any.whl Python 3 none any Details for multithreading-0.2.0-py3-none-any.whl

Total release size: 11.5 kB

Release files / multithreading-0.2.0.tar.gz

Download URL multithreading-0.2.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
834acf40ed270a91f54cbdd65f15b94ad6a82d5185a0ea443778d7667e190dc8
BLAKE2b-256 checksum
How to use checksums
ff1bac73d57918d36ec132f9b1f7942c69ebee392fa339713d979d9e294e815e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

Release files / multithreading-0.2.0-py3-none-any.whl

Download URL multithreading-0.2.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69dbb9facadab83fb26693c7fa16b863ab340d8279fb5f127a424aa26398ef1f
BLAKE2b-256 checksum
How to use checksums
8a0c4b1a26c24039cefb51f1b79c05ce74e772c8bb1a5dbf4cf547ecd36447c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

Security for multithreading 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page