Skip to main content

wcpan.worker

An asynchronous task queue with priority support.

from wcpan.worker import AsyncQueue, Task


class HighPriorityTask(Task):

    @property
    def priority(self) -> int:
        return 2


class LowPriorityTask(Task):

    @property
    def priority(self) -> int:
        return 1


# Note this queue is non-preemptive.
queue = AsyncQueue()
queue.start()

# function_2 will come first.
queue.post(LowPriorityTask(function_1))
queue.post(HighPriorityTask(function_2))

# cancel pending tasks
queue.flush()

# wait for executing task (if any) ends, then stop the queue
await queue.stop()

Metadata

Release files for wcpan-worker 6.1.1

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

Source distribution (sdist)

Source distribution for wcpan-worker 6.1.1
File Size Uploaded Provenance Actions
wcpan_worker-6.1.1.tar.gz 4.1 kB Without provenance Details for wcpan_worker-6.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wcpan-worker 6.1.1
File Interpreter ABI Platform Actions
wcpan_worker-6.1.1-py3-none-any.whl Python 3 none any Details for wcpan_worker-6.1.1-py3-none-any.whl

Total release size: 9.3 kB

Release files / wcpan_worker-6.1.1.tar.gz

Download URL wcpan_worker-6.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5906088295b68820a57e55940a19df4bd94d39571a8a49ecde44c6ab133e5883
BLAKE2b-256 checksum
How to use checksums
7adbead47b139c91da26e3c9b919c88560701b2166eb7e3cf424e652726d753c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.9.2 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / wcpan_worker-6.1.1-py3-none-any.whl

Download URL wcpan_worker-6.1.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e741292595f258cf8e5bf84f80efb518633145202bd8c4c6c8a80f2b9255ab0c
BLAKE2b-256 checksum
How to use checksums
aa8c9a5abe659b2fdd17a2e1d540495d3e5c06dfb3c10578fac40c680738d2c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.9.2 Linux/5.15.90.1-microsoft-standard-WSL2

Security for wcpan-worker 6.1.1

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.

Release history Release notifications | RSS feed

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