4 ms·
I don't know, but I remember hearing in a talk that the compiler had to be modified to insert them into the generated code. Here's `isAsyncSafePoint`: https://
by MathMonkeyMan 2y ago
I don't know, but I remember hearing in a talk that the compiler had to be modified to insert them into the generated code.
Here's `isAsyncSafePoint`: https://github.com/golang/go/blob/d36353499f673c89a267a489beb80133a14a75f9/src/runtime/preempt.go#L363 https://github.com/golang/go/blob/d36353499f673c89a267a489be...
edit: The comments at the top of that file say:
// 3. Asynchronous safe-points occur at any instruction in user code
// where the goroutine can be safely paused and a conservative
// stack and register scan can find stack roots. The runtime can
// stop a goroutine at an async safe-point using a signal.