-
New concurrent core:
ConcurrentCollection: High-throughput unordered containerConcurrentBuffer: Shard-optimized with windowed enqueues
-
Workobject introduced:- Awaitable wrapper over
Futurewith lifecycle hooks - Manual disposal, metadata, and thread-safe operation
- Awaitable wrapper over
-
QueueAllocatoradded:- Efficient ticket-based ID pool manager
- Recyclable, disposable, context-safe
-
Initial
Workerscaffolding created -
Performance benchmarking suite:
- CSV / JSON / YAML export
- Integrated plotting system
- Validated: up to 6× faster than
multiprocessing.Queue, up to 2.6× faster thandeque+Lock
-
Disposable pattern implemented across all core classes
ThreadFactory.submit(fn)→Workinstance- Dynamic worker scaling, priority-aware queueing
- Support for timeouts, retries, and soft/hard cancellation
- Custom pluggable queue backends (
deque,ConcurrentQueue, work-stealing) - Async-aware thread orchestration
- Reader/Writer Locks with upgrade/downgrade support
- Spinlocks and lightweight hybrid locks
AsyncLockand async-compatible synchronization
ConcurrentSetwith add/remove/map/filter- Priority queues: min-heaps, max-heaps, bounded
- Shared-memory data primitives (future)
- Lock-free ring buffers (planned)
- Submit a list of callables to be executed as a unit
- Execution modes:
parallel(all concurrently)sequential(ordered execution)chain(pipe result to next)
- Support policies:
wait_allfirst_errorfirst_completed
- Returns list of
Workobjects - Integrated with
WorkerPoolorThreadFactory.submit_all(...)
- Named group of
Workobjects with lifecycle controls - Add/remove dynamically
- Supports teardown logic and shared metadata
- Attach continuations like:
factory.submit(task1).then(task2).then(task3)
- Chain transformations or trigger error handlers
- Support
.then(),.on_success(),.on_failure()
- DAG-based task dependency execution
- Automatic ordering and cycle detection
- Supports fan-in / fan-out topology
- Can be used for workflows, ML pipelines, etc.
- Static set of independent tasks
- Tracks completion and progress state
- Unified cancellation and error summary
- Waits for N
Workunits to complete before continuing - Useful for intermediate sync points or triggers
AsyncThreadFactory- Fully
asynciocompatible -
await factory.submit(...)
- Zero-copy integration
- Real-time thread state visualizer
- In-flight task tracking, queue depth, execution metrics
- Contention index tracking
- DAG-based orchestration
- Backoff strategies and work throttling
- Metrics feedback loop per worker
- ThreadFactory as the concurrency backbone of Python’s Free Threading era
- Distributed execution across multiple systems
- Cooperative task networks (actor-style, reactive)
- Optional native backends (C/C++) for ultra-low latency workloads