TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Can running goroutines directly read the updated value of writeBarrier?

1 pointsby weiwenhaoover 1 year ago
I am working on implementing a concurrent tri-color marking garbage collector. I read some posts that mention that prior to version 1.14, Golang could not forcibly stop goroutines, making it impossible to start GC. My question is, once the global variable runtime.writeBarrier is updated, wouldn&#x27;t the running goroutines read the updated writeBarrier and activate the write barrier? Why is it necessary to wait for the goroutines to stop?<p>CMPL runtime.writeBarrier(SB), $0 JEQ 103 JMP 108

no comments

no comments