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.

Golang Sync Mutex: Normal and Starvation Mode

39 pointsby lcof10 months ago

2 comments

mrkeen10 months ago
&gt; Mutex, or MUTual EXclusion, in Go is basically a way to make sure that only one goroutine is messing with a shared resource at a time. This resource can be a piece of code, an integer, a map, a struct, a channel, or pretty much anything.<p>This is untrue right? It can only protect <i>code</i>, not <i>data</i>, right?
评论 #41215449 未加载
评论 #41218683 未加载
评论 #41232051 未加载
Animats10 months ago
I have misgivings about such long spinlocks in user space. A millisecond is over a million instructions.
评论 #41214275 未加载