News for hackers. Stuff that matters.
Re:Introduction to Golang Preemption Mechanisms by MathMonkeyMan on Monday August 12, 2024 @05:04AM (#41222546)
The runtime never determines whether the goroutine is at a safe point. It "poisons" the stack guard so that the next time the goroutine reaches a function prologue, which is a safe point, it examines the stack guard and knows that it has been preempted.

Then there's the async case for tight loops that I remember reading about back in 2020 (it uses unix signals), but don't yet fully grok the specifics.

There are no comments on this comment yet.