Thetis v1: first cut at wait-free primitives (the Thetis26 ancestor)
Short note on the original Thetis (Jul 2020, ~136 commits in one month). This is the direct ancestor of Thetis26 — the 2026 rewrite exists because of what this version got right and what it didn’t.
What v1 shipped
- A handful of SPSC / MPSC ring buffers.
- A draft concurrent hashmap.
- A Julia interop layer (unusual choice in hindsight —
env-julia.sh,gen_ThetisSupport_*.jl,install-juliapkgs.jl). The idea was to use Julia as the reference implementation and cross-check C++ behaviour against it. - CMake, a Swift-targeted build script, a Mac test runner. Multi-platform from day one.
What it didn’t have
- No formal verification. The Julia reference was a poor substitute for TLA+ — it gave you empirical agreement on one interleaving, not a proof over all of them.
- No wait-free tier. The “wait-free” label in the name was aspirational; v1 was lock-free in the usual sense.
- No weak-memory-model story. Everything was tested on x86_64. ARM64 would have exposed ordering bugs; I didn’t have the tools to find them.
Why the 2026 rewrite
The gap between “lock-free and mostly works on x86” and “wait-free where that buys you something, verified against the C11 memory model, tested on ARM and RISC-V” is not a rewrite I could have landed in 2020 — the tooling wasn’t there for me (GenMC, Nidhugg, Kani were either missing or I didn’t know them). v1 was the honest version of what I could ship then.
Code @ github.com/zeta1999/Thetis.
Written on November 5, 2020