Skip to main content

workerqueue

A thread-based worker queue

Installation

pip install workerqueue

Usage

from workerqueue import WorkerQueue
from time import sleep

def myfunc(arg1, arg2):
    print(f"{arg1}*2={arg2}")
    sleep(0.5)

myqueue = WorkerQueue(myfunc, thread_count=2)

for i in range(10):
    myargs = i, i*2
    myqueue.put(myargs)

sleep(1)

print("Calling stop()...")
myqueue.stop()

print("Finished processing")

Metadata

Release files for workerqueue 0.0.2

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

Source distribution (sdist)

Source distribution for workerqueue 0.0.2
File Size Uploaded
workerqueue-0.0.2.tar.gz 1.7 kB Details

Built distribution (wheel)

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

Total release size: 3.9 kB

Release files / workerqueue-0.0.2.tar.gz

Download URL workerqueue-0.0.2.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
316d3fd53f4f3513abd86009f65ef1c2e2a80945372ac07202f2a375ad97838e
BLAKE2b-256 checksum
How to use checksums
dc1cba0164889a2ee58357af4231528e2271c36370f3a937ebb98bbf1c8bbdc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release files / workerqueue-0.0.2-py3-none-any.whl

Download URL workerqueue-0.0.2-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2ca90a4b41938ec3d3ca01e2be620cec63ce8d19a2534b6a1e2991102bda93a
BLAKE2b-256 checksum
How to use checksums
9597d08f9efca71630f0b6aa72e6b99a901b5e1095484b25b7e852d4fcfa7d7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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