tgc 0.1.0

Opt-in thread-local garbage collector for D - per-thread heaps without global stop-the-world


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

= tgc Opt-in thread-local garbage collector for D (tgc). Each attached thread owns a private heap arena; collection on one thread does not stop-the-world pause sibling threads or detached @nogc workers. Informal name: realtime GC. Registered runtime name: tgc. Part of link:https://github.com/dlang-supplemental[dlang-supplemental]. Design write-up: link:https://dlang-supplemental.github.io/docs/docs/blog/thread-local-gc-tgc.html[Thread-local GC (tgc) for D]. == Install [source,powershell] ---- dub add tgc ---- == Enable Import the hook module so the factory is linked, then select the collector: [source,d] ---- import tgc.gcobj; // Option A  runtime flag // ./app --DRT-gcopt=gc:tgc // Option B  default at link time (add versions "Tgcdefault" to your dub config) extern(C) gshared rtoptions = ["gcopt=gc:tgc"]; ---- == Requirements DMD 2.112+ or LDC with pluggable GC + `registerGCFactory` thread init hook (same era as SymGC integration). Prefer message passing / ownership transfer across threads; unrestricted shared mutable GC pointers are unsupported in v1. == Changelog See link:CHANGELOG.adoc[CHANGELOG.adoc]. == License BSL-1.0  see link:LICENSE[LICENSE].

Authors:
  • amdphreak
Dependencies:
none
Versions:
0.1.1 2026-Aug-22
0.1.0 2026-Aug-22
Show all 2 versions
Download Stats:
  • 103 downloads today

  • 104 downloads this week

  • 104 downloads this month

  • 104 downloads total

Score:
0.8
Short URL:
tgc.dub.pm