
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
async-queue-manager
is a Python library designed to manage and execute tasks concurrently using asyncio.
It supports task prioritization, robust error handling, and efficient queue management for both finite
and infinite task processing modes.
QueueItem:
TaskQueue:
finite
: Process tasks and stop.infinite
: Continuously process tasks until stopped.Ensure you have Python 3.10+ installed.
pip install async-queue-manager
import asyncio
from async_queue.task_queue import TaskQueue
from async_queue.queue_item import QueueItem
async def my_task(name, duration):
print(f"{name} is starting...")
await asyncio.sleep(duration)
print(f"{name} is finished.")
async def main():
queue = TaskQueue(workers=3, mode='finite')
# Add tasks
for i in range(5):
task = QueueItem(my_task, name=f"Task-{i}", duration=2)
queue.add(item=task, priority=i)
# Run the queue
await queue.run(queue_timeout=10)
# Run the program
asyncio.run(main())
queue_item.py
: Implements the QueueItem
class.task_queue.py
: Contains the TaskQueue
class for task management.Contributions are welcome!
This project is licensed under the MIT License. See the LICENSE file for details.
See the documentation for more details.
FAQs
Asynchronous Task Queue
We found that async-queue-manager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.