Skip to content

Comment on Golang Sync Mutex: Normal and Starvation Modeparent

Comments

lcofOP

By “us”, I was referring to normal, everyday go devs (versus working on go itself).

I think starvation mode is a pragmatic way of solving the issue: overtaking happens when the fast path assumption is wrong - but absolute fairness is not a requirement. So it’s ok. The gains of the fast path is enough to justify having that starvation mode.

I would argue that if some piece of code ends up wasting lots of time on futex calls, it suggests that this code was not designed with the right use case in mind.

Interesting comment about wine’s allocator, did not know about this

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.