Comment

Comment by eternalban

What "'old' value" are you talking about?

This is a pointer:

    val := atomic.LoadUint64(&a)
> Because sync.Wait() isn't used, there's no guarantee the goroutine will execute at all before program halt.

It's an infinite loop ...

> I'm not sure why atomic.Add* should get special treatment though

Because it side effects and arguably it is a form (mem) I/O in context of modern systems.

parent eternalban 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton