Comment

Comment by masklinn

> Would something like golang even need lock-counting like BEAM ?

BEAM locks are within the VM's implementation[0]: http://www.erlang.org/doc/apps/tools/lcnt_chapter.html. BEAM lock counting is about introspecting runtime state and capabilities.

I doubt Go's runtime is lockfree. The answer would thus be "yes, most likely".

> I think the idiomatic way to work with golang is goroutines rather than mutex

1. depends: http://stackoverflow.com/questions/10728863/how-to-lock-sync... https://code.google.com/p/go-wiki/wiki/MutexOrChannel

2. I doubt channels implementation is lock-free, though I could well be wrong

[0] and maybe in NIF[1] as well

[1] http://www.erlang.org/doc/tutorial/nif.html

parent masklinn 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton