News
Thread-local GC proposed upstream
We opened an opt-in thread-local garbage collector for D—registered as tgc—against upstream DMD/druntime.
GitHub records the pull request as opened : dlang/dmd#23514.
Select it at runtime. The default conservative collector does not change:
./app --DRT-gcopt=gc:tgc
Each attached thread owns a private heap. A local collection should not
call thread_suspendAll, so sibling threads and detached
@nogc workers keep running. Cross-thread sharing of mutable
GC pointers is out of scope for v1.
Read next:
- Essay: Isolating heaps as threads isolate data
- Docs: technical design
- Forum thread (posted 3 August 2026)