BackendStarted 2024

Cyclone

C++ multithreading library for Windows real-time apps with job-based scheduling, loop parallelization, priority control, and cross-thread dependency contexts.

C++17MultithreadingPremakeWindows
Cyclone project preview
Role
Independent Systems Engineer
Development Began
2024
Status
Open-Source Library

Evidence at a Glance

1.5M
Documented Dispatch Workload

The public example divides a large data set into grouped jobs.

Hardware-aware
Worker Provisioning

The library launches workers around available hardware concurrency.

Contexts
Dependency Boundary

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

01

Make Jobs the Unit of Scheduling

Workers claim submitted jobs automatically, keeping thread ownership inside the library and task intent at the call site.

02

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.

03

Support Function and Loop Workloads

Execute handles discrete work while Dispatch partitions a range into job groups using the same scheduling system.

04

Keep Priority Explicit

Priority can influence pickup order without requiring a separate execution API or exposing the queue implementation.

What I Owned

Designed and implemented the worker, job, dispatch, priority, and context APIs.
Supported hardware-aware worker provisioning and grouped loop parallelism.
Provided context-level waiting for cross-thread dependency management.
Documented direct usage for both batched functions and large data-parallel loops.
Packaged a repeatable C++17 Windows build through Premake.

Results

Real-time systems can submit concurrent work through a compact API without manually creating or joining threads.
The same dependency primitive covers both explicit tasks and partitioned loop jobs.
The complete implementation and examples are publicly inspectable.

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.