Evidence at a Glance
The public example divides a large data set into grouped jobs.
The library launches workers around available hardware concurrency.
Callers can group jobs and wait on a meaningful unit of work.
Overview
Cyclone is a C++17 job system for Windows real-time applications. It turns independent functions and loop ranges into jobs that available worker threads can claim, avoiding the need for each caller to manage threads directly.
The public API is intentionally small: Execute submits individual functions; Dispatch divides loop work into groups; Context associates related jobs; and Wait synchronizes at that context boundary. Priority controls influence which work is claimed first without changing the submission model.
The library is packaged with Premake-based project generation and documented usage examples, making the concurrency model inspectable rather than presenting multithreading as a black box.
The Challenge
A thread pool is easy to start and difficult to make pleasant to use. The caller needs enough control to express priorities and dependencies without inheriting worker lifecycle, manual partitioning, or ad hoc synchronization at every call site.
Real-time workloads also vary in granularity. The same abstraction needs to handle a handful of explicit tasks and a large loop without making either path awkward.
Key Engineering Decisions
Make Jobs the Unit of Scheduling
Workers claim submitted jobs automatically, keeping thread ownership inside the library and task intent at the call site.
Use Contexts as Synchronization Scopes
A context groups related work so callers wait on a dependency boundary instead of tracking individual futures or worker threads.
Support Function and Loop Workloads
Execute handles discrete work while Dispatch partitions a range into job groups using the same scheduling system.
Keep Priority Explicit
Priority can influence pickup order without requiring a separate execution API or exposing the queue implementation.
What I Owned
Results
Valuable Lessons
Concurrency abstractions earn their value by making ownership and waiting obvious at the call site.
Benchmarking throughput is only half the story; future evaluation should also make contention, tail latency, and shutdown behavior visible.
