# Go's GC forced Go to add signal-based preemption

Original title: Not sure where I am going with this garbage collection rabbit hole

> Hacker News story 49275701 · language: en · submitted 2026-08-12
> Web version: https://zeli.app/story/49275701
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 10 · by [argentum47](<https://news.ycombinator.com/user?id=argentum47>) · 💬 0
[original](<https://ikouchiha47.github.io/2026/08/12/concurrency-and-gc.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49275701>)

## Summary

Go, Kotlin, and Erlang/Elixir each solve M:N scheduling differently, and their choices about who controls task switching shape everything from preemption to garbage collection. Go's GC originally relied on cooperative preemption, which let tight loops without function calls hang the entire process. The fix—signal-based preemption via SIGURG—was driven by this GC deadlock, not just fairness. This deep dive traces Go's evolution from cooperative to asynchronous safe-points, explaining the GMP scheduler, the tricolor mark-sweep GC, and why Go rejected loop-back-edge checks for a 7.8% throughput cost.

## Key quote

> A goroutine stuck in a tight loop with no function calls blocked this indefinitely.

---

## Cite

- Page: https://zeli.app/story/49275701
- Date: 2026-08-12
- Source: ikouchiha47.github.io (https://ikouchiha47.github.io/2026/08/12/concurrency-and-gc.html)
- Hacker News: https://news.ycombinator.com/item?id=49275701

## Other languages

- zh: https://zeli.app/zh/story/49275701 · markdown: https://zeli.app/zh/story/49275701.md
- ko: https://zeli.app/ko/story/49275701 · markdown: https://zeli.app/ko/story/49275701.md
- es: https://zeli.app/es/story/49275701 · markdown: https://zeli.app/es/story/49275701.md
