funboost-memory-queue-pool

Implements local concurrent task execution using funboost memory queues and thread pool replacements.

892|166|Updated Dec 25, 2021
One-click install
npx skills add https://github.com/ydf0509/funboost --skill funboost-memory-queue-pool-ydf0509
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: funboost-memory-queue-pool
Source: https://github.com/ydf0509/funboost/tree/main/.agents/skills/funboost-memory-queue-pool
Command: npx skills add https://github.com/ydf0509/funboost --skill funboost-memory-queue-pool-ydf0509

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires funboost.

What problem does it solve? When you need concurrent task execution in Python without deploying Redis, RabbitMQ, or other middleware, traditional ThreadPoolExecutor lacks QPS rate limiting, retries, timeouts, and result retrieval. This Skill guides you to use funboost's MEMORY_QUEUE broker and pool classes as a zero-dependency local concurrency solution. ## Core Features & Use Cases - ThreadPoolExecutor Replacement: Swap ThreadPoolExecutor(...) for MemoryFunboostPool(...) or FunboostPool(...) with an identical pool.submit(fn, *args) API, gaining QPS control and concurrency management. - In-Process Future Results: Use get_future() and get_aio_future() to retrieve task results via concurrent.futures.Future without any Redis RPC dependency. - Non-Serializable Arguments: Pass arbitrary Python objects (database connections, custom class instances) as task arguments since memory queues skip serialization entirely. - Use Case: During local development, run tasks with BrokerEnum.MEMORY_QUEUE; when deploying to production, change only the broker_kind line to REDIS_ACK_ABLE while keeping all business code unchanged. ## Quick Start Ask the AI to rewrite your ThreadPoolExecutor-based concurrent code using funboost MemoryFunboostPool with a specified concurrency number and QPS limit.

Frequently Asked Questions about funboost-memory-queue-pool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace ThreadPoolExecutor with funboost?▼

Replace ThreadPoolExecutor with MemoryFunboostPool from funboost, keeping the same pool.submit(fn, *args) API. You gain QPS rate limiting and concurrency control, and future.result() returns the function's return value directly.

How to get task results from a funboost memory queue?▼

Call publisher.get_future(*args) on a MEMORY_QUEUE-boosted function to receive a concurrent.futures.Future. Calling future.result(timeout) returns a FunctionResultStatus object containing the result and success flag, with no Redis RPC needed.

What is the difference between MemoryFunboostPool and FunboostPool?▼

MemoryFunboostPool is fixed to the in-memory broker with no retries and auto-generated queue names. FunboostPool accepts full BoosterParams, supports distributed brokers like Redis and RabbitMQ, and enables retries, timeouts, and RPC results.

Can funboost memory queue work across multiple processes?▼

No, MEMORY_QUEUE requires the publisher and consumer to run in the same Python process. It cannot share tasks across processes or machines; switch broker_kind to REDIS_ACK_ABLE or another distributed broker for cross-process execution.

What happens to memory queue tasks when the process exits?▼

All unconsumed and in-flight tasks are lost when the process exits, restarts, or is killed, since MEMORY_QUEUE performs no disk persistence. Use SQLITE_QUEUE or REDIS_ACK_ABLE if you need task durability and recovery.